I ran composer update in my project that I cloned because I changed my computer. And it's returned the following errors, but I don't get how to solved them... :
Problem 1
- The requested PHP extension ext-mcrypt * is missing from your
system. Install or enable PHP's mcrypt extension.
Problem 2
- Installation request for guzzle/guzzle v3.9.3 -> satisfiable by guzzle/guzzle[v3.9.3].
- guzzle/guzzle v3.9.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 3
- Installation request for phpoffice/phpexcel 1.8.1 -> satisfiable by phpoffice/phpexcel[1.8.1].
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension xml is missing from your system.
Problem 4
- Installation request for sentry/sentry 1.5.0 -> satisfiable by sentry/sentry[1.5.0].
- sentry/sentry 1.5.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 5
- guzzle/guzzle v3.9.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- intercom/intercom-php v1.0.0 requires guzzle/guzzle ~3.9 -> satisfiable by guzzle/guzzle[v3.9.3].
- Installation request for intercom/intercom-php v1.0.0 -> satisfiable by intercom/intercom-php[v1.0.0].
The final solution was to run this :
sudo apt-get install php5.6-mcrypt
sudo apt-get install php5.6-curl
sudo apt-get install php5.6-xml
For Php -V 7
sudo apt-get install php7.1-mcrypt
sudo apt-get install php7.1-curl
sudo apt-get install php7.1-xml
Just install missed extensions, as Composer reported.
sudo apt-get install php-mcrypt
sudo apt-get install php-curl
sudo apt-get install php-xml
For Php -V 8
sudo apt-get install php8.1-mcrypt
sudo apt-get install php8.1-curl
sudo apt-get install php8.1-xml
Related
I am newbie to php , I am trying to run laravel project with mongodb , but i am unable to install mongodb 1.60 php driver
Your requirements could not be resolved to an installable set of packages.
Problem 1
- mongodb/mongodb 1.6.0 requires ext-mongodb ^1.7 -> the requested PHP extension mongodb has the wrong version (1.3.4) installed.
- Installation request for mongodb/mongodb 1.6.0 -> satisfiable by mongodb/mongodb[1.6.0].
I tried this command
sudo apt-get install php-mongodb
this commands installs mongodb php-mongodb_1.3.4-1build1 .
when i tried to install 1.6 , response says 1.6 version not found
sudo apt-get install php-mongodb
E: Version '1.6' for 'php-mongodb' was not found
can anyone please help here.
So the mongodb/mongodb package is a php package, when you're doing the laravel install via composer, it's throwing an error stating it needs the 1.6.0 version of that package.
The problem is it requires your server php to have the ext-mongodb ^1.7 extension.
It currently has the 1.3.4 version.
You can see how to install it here: https://docs.mongodb.com/drivers/php
The problem is a mismatch of packages being installed
You could consider removing the packages and installing them as detailed on this page
[https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/][1]
See below for ubuntu 18.04
Remove old mongodb packages
sudo apt-get purge mongodb*
Add the correct repo
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
update
sudo apt-get update
Install the new package
sudo apt-get install -y mongodb-org
sudo rm -rf /tmp/mongodb-27017.sock
sudo rm -f /var/lib/mongo/mongod.lock
sudo rm -f /var/run/mongodb/mongod.pid
touch /var/run/mongodb/mongod.pid
sudo chown -R mongodb:mongodb /var/run/mongodb/
sudo chown mongodb:mongodb /var/run/mongodb/mongod.pid
sudo systemctl start mongod
Install the correct driver for mongo (note the php-version 7.2)
sudo apt-get install php7.2-mongodb
hi guys am trying to host a laravel 5.6 app on a VPS for the first time and i cant seem to get it right..am using LEMP.i followed some guide which was using php 7.0 but my project requires php 7.1 "i think i managed to resolve the error using the following line"
sudo apt-get install php7.1-cli php7.1-fpm php7.1-mbstring php7.1-mysql
php7.1-mcrypt php7.1-curl
now am getting the following error
Problem 1
- Installation request for phpoffice/phpexcel 1.8.1 -> satisfiable by
phpoffice/phpexcel[1.8.1].
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension
xml is missing from your system.
Problem 2
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension
xml is missing from your system.
- maatwebsite/excel 2.1.28 requires phpoffice/phpexcel ^1.8.1 -> satisfiable
by phpoffice/phpexcel[1.8.1].
- Installation request for maatwebsite/excel 2.1.28 -> satisfiable by
maatwebsite/excel[2.1.28].
this is my first time so any useful information is very welcome :)
You would need to install the php-xml package. You can do it using the following command:
sudo apt-get install php-xml
When the package is installed run the composer install again.
You can read more about this issue here: https://laracasts.com/discuss/channels/servers/how-do-i-install-the-dom-extension-for-php7
edit:
if it does not install the correct version of the package, you can use the command from #Dharma Saputra's comment:
sudo apt-get install php7.1-xml
OS: Ubuntu 17.10 (Artful Aardvark)
I have installed the LAMP stack and Laravel, and when I tried composer install in my Laravel application, I got the following errors.
- Installation request for phar-io/manifest 1.0.1 -> satisfiable by phar-io/manifest[1.0.1].
- phar-io/manifest 1.0.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 2
- Installation request for phpunit/php-code-coverage 5.2.2 -> satisfiable by phpunit/php-code-coverage[5.2.2].
- phpunit/php-code-coverage 5.2.2 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 3
- Installation request for phpunit/phpunit 6.4.3 -> satisfiable by phpunit/phpunit[6.4.3].
- phpunit/phpunit 6.4.3 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 4
- Installation request for theseer/tokenizer 1.1.0 -> satisfiable by theseer/tokenizer[1.1.0].
- theseer/tokenizer 1.1.0 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.1/cli/php.ini
- /etc/php/7.1/cli/conf.d/10-opcache.ini
- /etc/php/7.1/cli/conf.d/10-pdo.ini
- /etc/php/7.1/cli/conf.d/20-calendar.ini
- /etc/php/7.1/cli/conf.d/20-ctype.ini
- /etc/php/7.1/cli/conf.d/20-exif.ini
- /etc/php/7.1/cli/conf.d/20-fileinfo.ini
- /etc/php/7.1/cli/conf.d/20-ftp.ini
- /etc/php/7.1/cli/conf.d/20-gettext.ini
- /etc/php/7.1/cli/conf.d/20-iconv.ini
- /etc/php/7.1/cli/conf.d/20-json.ini
- /etc/php/7.1/cli/conf.d/20-mbstring.ini
- /etc/php/7.1/cli/conf.d/20-pdo.ini
- /etc/php/7.1/cli/conf.d/20-phar.ini
- /etc/php/7.1/cli/conf.d/20-posix.ini
- /etc/php/7.1/cli/conf.d/20-readline.ini
- /etc/php/7.1/cli/conf.d/20-shmop.ini
- /etc/php/7.1/cli/conf.d/20-sockets.ini
- /etc/php/7.1/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.1/cli/conf.d/20-sysvsem.ini
- /etc/php/7.1/cli/conf.d/20-sysvshm.ini
- /etc/php/7.1/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.
I have rechecked the files, all extensions are enabled and they are located in the
/usr/lib/php/20160303 folder.
Sometimes the problem is the php-xml extension.
Try:
sudo apt-get install php-xml
If still facing the issue then try
sudo apt-get install -y php7.1 php7.1-xml php7.1-mysql php7.1-curl php7.1-mbstring
Try following command:
sudo apt-get install php-mbstring
sudo apt-get install php-xml
As the log speaks we need to install the extension "dom". This is how we do it:
sudo apt install php7.1-dom
If the log shows only one extension missing, then the above command works. If there are other extensions missing, you can add those extensions in the same line like shown below:
sudo apt install php7.1-dom php7.1-ext-mbstring
That’s it. Now you won’t have any issues in installing PHP Composer. Enter composer install.
So I just installed Scotchbox (a vagrant setup).
https://github.com/scotch-io/scotch-box
I'm trying to install a composer dependancy when I get the following error.
Problem 1
- phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- phpunit/php-code-coverage 4.0.8 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- Installation request for phpunit/php-code-coverage (locked at 4.0.8) -> satisfiable by phpunit/php-code-coverage[4.0.8].
What I've tried
Some other thread suggested that this is included in the php-xml package. I tried installing this doing
sudo apt-get install php7.0-xml
sudo service apache2 restart
But that didn't work.
Any idea what other solutions might work? I'm starting to pull my hair out.
For me the selected answer didn't work.
This did work:
sudo apt-get install php-xml
This was on Ubuntu 16.04 with PHP 7.
Try
sudo apt-get install php7.0-common
use sudo apt-get install php7.2-xml if you are using ubuntu and php-fpm7.2
I am using Ubuntu 17.10 and PHP 7.1 is running well using:
sudo apt-get install php7.1-xml
and then (if using apache)
sudo service apache2 restart
or if on nginx you can use this:
sudo service nginx restart
Try this for PHP 7.4:
sudo apt-get install php7.4-xml
And for PHP 8.0:
sudo apt-get install php8.0-xml
First,
yum search php-xml
Then, choose one to yum install
yum install php71-php-xml.x86_64
Centos7 php7
I am trying to install composer to the laravel project.
When im doing sudo composer install in projects directory it shows me two errors:
Problem 1
- Installation request for simplesoftwareio/simple-qrcode dev-master -> satisfiable by simplesoftwareio/simple-qrcode[dev-master].
- simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
- Installation request for esendex/sdk ^1.3 -> satisfiable by esendex/sdk[v1.3.0].
- esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
I was checking how to install it and I found these commands:
composer require simplesoftwareio/simple-qrcode
composer require esendex/sdk
Anyway, they are giving me the same error. Is there anything I can do about it?
Looks like you have some PHP modules missing.
For PHP5
sudo apt-get install php5-curl
sudo apt-get install php5-gd
For PHP7
sudo apt-get install php7-curl
sudo apt-get install php7-gd
Packages may be different depending on your OS
Is there anything I can do about it?
Yes. You can install the two PHP modules that Composer tells you are required:
simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Exactly how you do that will depend on your operating system.
Ubuntu 16.10, for example, offers php-gd and php-curl system packages.