Estoy ejecutando laravel 5.4 en el servidor Ubuntu 16.04 con PHP7. tratando de instalar el cviebrock/eloquent-sluggable
paquete arrojar algún error:
pish@let:/home/sherk/ftp/www$ sudo composer require cviebrock/eloquent-sluggable
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^4.2 for cviebrock/eloquent-sluggable
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- phpunit/php-code-coverage 4.0.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/php-code-coverage 4.0.7 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- Installation request for phpunit/php-code-coverage (installed at 4.0.7) -> satisfiable by phpunit/php-code-coverage[4.0.7].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.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-gd.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-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.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
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
No tengo problemas para instalar este paquete en la versión local de la aplicación.
sudo
para ejecutar composer, aparece este error:Could not read /home/pish/.composer/auth.json file_get_contents(/home/pish/.composer/auth.json): failed to open stream: Permission denied
php-mbstring
paquete, debería serlosudo apt-get
. Aparte de eso; funciona a las mil maravillas. ¡Gracias!composer install
sudo phpenmod xml
y haga lo mismo paraxmlreader
&xmlwriter
. Luego reinicie su servidor (si es apache:)sudo service apache2 restart
e intente instalarlo nuevamente.Para quienes deseen instalar ext-dom en php 7.1 y superior, ejecute este comando:
fuente
sudo update-alternatives --set php /usr/bin/php7.0
,php-xml
se descargaráphp7.0-xml
. Así que tenga cuidado al usar este enfoque, siempre recomendaría el enfoque dePara CentOS, RHEL, Fedora:
Luego seleccione la versión php-xml que coincida con su versión php:
fuente
sudo apt install php-xml
funcionará pero la cosa es que descargará el complemento para la última versión de PHP.Si su versión de PHP no es la última, entonces puede agregar una versión:
fuente
simplemente corre
me ha funcionado
fuente