1

Cuando intento crear un proyecto en Laravel, con PHP 7.0 tengo los siguientes errores:

ricky@pc:/var/www/html/proyectos$ laravel new 001
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
- Installation request for phpunit/php-code-coverage 4.0.8 -> 

satisfiable by phpunit/php-code-coverage[4.0.8].
    - phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
  Problem 2
    - Installation request for phpunit/phpunit 5.7.19 -> satisfiable by phpunit/phpunit[5.7.19].
    - phpunit/phpunit 5.7.19 requires ext-dom * -> the requested PHP extension dom is missing from your system.

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.0/cli/php.ini
    - /etc/php/7.0/cli/conf.d/10-opcache.ini
    - /etc/php/7.0/cli/conf.d/10-pdo.ini
    - /etc/php/7.0/cli/conf.d/20-calendar.ini
    - /etc/php/7.0/cli/conf.d/20-ctype.ini
    - /etc/php/7.0/cli/conf.d/20-exif.ini
    - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.0/cli/conf.d/20-ftp.ini
    - /etc/php/7.0/cli/conf.d/20-gettext.ini
    - /etc/php/7.0/cli/conf.d/20-iconv.ini
    - /etc/php/7.0/cli/conf.d/20-json.ini
    - /etc/php/7.0/cli/conf.d/20-mbstring.ini
    - /etc/php/7.0/cli/conf.d/20-mcrypt.ini
    - /etc/php/7.0/cli/conf.d/20-phar.ini
    - /etc/php/7.0/cli/conf.d/20-posix.ini
    - /etc/php/7.0/cli/conf.d/20-readline.ini
    - /etc/php/7.0/cli/conf.d/20-shmop.ini
    - /etc/php/7.0/cli/conf.d/20-sockets.ini
    - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.0/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.0/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.0/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.0/cli/conf.d/20-xdebug.ini
    - /etc/php/7.0/cli/conf.d/20-zip.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Application ready! Build something amazing.

El tema es que a pesar que me crea la estructura, cuando intento ver la versión de Artisan, obtengo lo siguiente:

ricky@pc:/var/www/html/proyectos/001$ php artisan -V
PHP Warning:  require(/var/www/html/proyectos/001/bootstrap/../vendor/autoload.php):
failed to open stream: No such file or directory in
/var/www/html/proyectos/001/bootstrap/autoload.php on line 17
PHP Stack trace:
PHP   1. {main}() /var/www/html/proyectos/001/artisan:0
PHP   2. require() /var/www/html/proyectos/001/artisan:16
PHP Fatal error:  require(): Failed opening required '/var/www/html/proyectos/001/bootstrap/../vendor/autoload.php'
(include_path='.:/usr/share/php') in
/var/www/html/proyectos/001/bootstrap/autoload.php on line 17
PHP Stack trace:
PHP   1. {main}() /var/www/html/proyectos/001/artisan:0
PHP   2. require() /var/www/html/proyectos/001/artisan:16

Necesito saber qué debo hacer. Alguna idea?

2
  • El tema no es Laravel, es tu entorno que debes resolver lo que falta instalandolo. Si la creación desde laravel no finaliza sin errores, no va a funcionar correctamente. Empieza por ver todos los paquetes que te reporta este ir instalando uno a uno ante cada error, por ejemplo ext-dom, phpunit, etc. Saludos! Commented el 21 abr. 2017 a las 10:13
  • Gracias Enrique, un abrazo.
    – Luis
    Commented el 21 abr. 2017 a las 13:56

1 respuesta 1

2

Esto solucionó mi problema:

sudo apt-get install php7.0-dom php7.0-mbstring

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.