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
Related
I'm trying to install laravel installer with the composer on my Ubuntu PC, but I get this error during the installation. `Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer v1.4.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v1.4.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1].
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-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-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.
`
The error appears then I use this comment:
composer global require "laravel/installer"
It says that it requires zip extension
laravel/installer v1.4.0 requires ext-zip...
Install using (to install the default version):
sudo apt install php-zip
Or, if you're running a specific version of PHP:
# For php v7.0
sudo apt-get install php7.0-zip
# For php v7.1
sudo apt-get install php7.1-zip
# For php v7.2
sudo apt-get install php7.2-zip
# For php v7.3
sudo apt-get install php7.3-zip
# For php v7.4
sudo apt-get install php7.4-zip
FOR MAC USERS with CATALINA
First, install homebrew.
Then, say
brew install php#7.3
brew link php#7.3
restart the console and run the laravel installer
On centos 7 I have used:
yum install php-pecl-zip
because any other solution didn't work for me.
For PHP7.1 install this
sudo apt-get install php7.1-zip
If you're facing this issue with macOS Catalina, I recommend these steps:
Install Homebrew (if you haven't already done so): head over to brew.sh or simply run this command: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Run brew install php#7.3
Update your $PATH variable to include the newly installed version of php:
echo 'export PATH="/usr/local/opt/php#7.3/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/php#7.3/sbin:$PATH"' >> ~/.zshrc
Reload your shell preferences script $ source ~/.zshrc or source ~/.bashrc
Finally, install laravel: composer global require laravel/installer
For Ubuntu 16.04, I have used this command for PHP7.2 and it worked for me.
sudo apt-get install php7.2-zip
Centos 7 with PHP7.2:
sudo yum --enablerepo=remi-php72 install php-pecl-zip
to know your php version
php -v
for php 7.3.0
sudo apt-get install php7.3-zip
V=`php -v | sed -e '/^PHP/!d' -e 's/.* \([0-9]\+\.[0-9]\+\).*$/\1/'` \
sudo apt-get install php$V-zip
For Mac with Macports,
# port install php71-zip
For PHP 7.2 in Ubuntu 18.04 LTS
sudo apt-get install php7.2-zip
Works like a charm
zip extension is missing, You can avoid this error by simple running below command, It will take version by default
sudo apt-get install php-zip
In case you need any specific version, You need to mention a specific version of your php, Suppose I need to install X version of php-zip then the command will be.
sudo apt-get install phpX-zip
Replace X with your required version, In my case, it is X = 7.3
For macOs users you can use Homebrew instead :
# For php v7.0
brew install php#7.0
# For php v7.1
brew install php#7.1
# For php v7.2
brew install php#7.2
# For php v7.3
brew install php#7.3
# For php v7.4
brew install php#7.4
I am using WSL with ubuntu 16.04 LTS version with php 7.3 and laravel 5.7
sudo apt-get install php7.3-zip
Work for me
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
I'm trying to install laravel installer with the composer on my Ubuntu PC, but I get this error during the installation. `Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/installer v1.4.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- laravel/installer v1.4.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
- Installation request for laravel/installer ^1.4 -> satisfiable by laravel/installer[v1.4.0, v1.4.1].
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-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-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.
`
The error appears then I use this comment:
composer global require "laravel/installer"
It says that it requires zip extension
laravel/installer v1.4.0 requires ext-zip...
Install using (to install the default version):
sudo apt install php-zip
Or, if you're running a specific version of PHP:
# For php v7.0
sudo apt-get install php7.0-zip
# For php v7.1
sudo apt-get install php7.1-zip
# For php v7.2
sudo apt-get install php7.2-zip
# For php v7.3
sudo apt-get install php7.3-zip
# For php v7.4
sudo apt-get install php7.4-zip
FOR MAC USERS with CATALINA
First, install homebrew.
Then, say
brew install php#7.3
brew link php#7.3
restart the console and run the laravel installer
On centos 7 I have used:
yum install php-pecl-zip
because any other solution didn't work for me.
For PHP7.1 install this
sudo apt-get install php7.1-zip
If you're facing this issue with macOS Catalina, I recommend these steps:
Install Homebrew (if you haven't already done so): head over to brew.sh or simply run this command: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Run brew install php#7.3
Update your $PATH variable to include the newly installed version of php:
echo 'export PATH="/usr/local/opt/php#7.3/bin:$PATH"' >> ~/.zshrc
echo 'export PATH="/usr/local/opt/php#7.3/sbin:$PATH"' >> ~/.zshrc
Reload your shell preferences script $ source ~/.zshrc or source ~/.bashrc
Finally, install laravel: composer global require laravel/installer
For Ubuntu 16.04, I have used this command for PHP7.2 and it worked for me.
sudo apt-get install php7.2-zip
Centos 7 with PHP7.2:
sudo yum --enablerepo=remi-php72 install php-pecl-zip
to know your php version
php -v
for php 7.3.0
sudo apt-get install php7.3-zip
V=`php -v | sed -e '/^PHP/!d' -e 's/.* \([0-9]\+\.[0-9]\+\).*$/\1/'` \
sudo apt-get install php$V-zip
For Mac with Macports,
# port install php71-zip
For PHP 7.2 in Ubuntu 18.04 LTS
sudo apt-get install php7.2-zip
Works like a charm
zip extension is missing, You can avoid this error by simple running below command, It will take version by default
sudo apt-get install php-zip
In case you need any specific version, You need to mention a specific version of your php, Suppose I need to install X version of php-zip then the command will be.
sudo apt-get install phpX-zip
Replace X with your required version, In my case, it is X = 7.3
For macOs users you can use Homebrew instead :
# For php v7.0
brew install php#7.0
# For php v7.1
brew install php#7.1
# For php v7.2
brew install php#7.2
# For php v7.3
brew install php#7.3
# For php v7.4
brew install php#7.4
I am using WSL with ubuntu 16.04 LTS version with php 7.3 and laravel 5.7
sudo apt-get install php7.3-zip
Work for me
I am trying to install magento/product-community-edition 2.1.3 in cloud9 (Ubuntu 14.04.3 LTS) with PHP 7.0.15
I get the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for magento/product-community-edition 2.1.3 -> satisfiable by magento/product-community-edition[2.1.3].
- magento/product-community-edition 2.1.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
To enable extensions, verify that they are enabled in those .ini files:
- /home/ubuntu/.phpbrew/php/php-7.0.15/etc/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
I tried to do the following installation on install php70-gd on ubuntu but I still get the same error afterwards.
How will I successfully install magento 2?
Use following command to install the gd extension:
sudo apt-get install php5.6-gd
it will work for PHP version 5.6
If you are using any other verison of PHP, replace 5.6 by that like:
sudo apt-get install php7.0-gd
for PHP 7.0
run
sudo apt-get install php5.6-gd
or
sudo apt-get install phpX.X-gd
then check your .ini files:
To enable extensions, verify that they are enabled in your .ini
files:
- /etc/php/7.0/cli/php.ini
change
;extension=...
to extension=... for each dependency you need.
If the error is still there, check the PHP version on your localhost/server and the PHP version that you are using with your Magento.
Be aware that all versions of PHP are not compatible to Magento.
More informations: http://devdocs.magento.com/guides/v2.0/comp-mgr/trouble/cman/php-version.html
Good luck!
PS: If you got the same issue for ext-mcrypt, ext-dom or anything else, you will have to follow the same process and then re-run the composer installation.
sudo apt-get install php7.0-dom
sudo apt-get install php7.0-mcrypt
sudo apt-get install php7.0-curl
I have php7 installed on ubuntu 14.04
I have problems with curl
I tried to run composer install and it gives me error
Your requirements could not be resolved to an installable set of packages.
Problem 1
- stripe/stripe-php v2.3.0 requires ext-curl *-> the requested PHP extension curl is missing from your system.
I also tried sudo apt-get install php-curl. This gives me output:
E: Unable to locate package php-curl
Help
Try using:
sudo apt-get install php7.0-curl
Follow these steps:
Install cURL:
sudo apt-get install php-curl OR sudo apt-get install php7.0-curl
Enable cURL extension in php.ini file. ;extension=php_curl.dll Uncomment this.
All done, Cheers!
Installing php 7 curl in kali linux
If you installed your php7 manually,
Open your terminal and simply type
sudo apt-get install php-curl without quotes and you are done.
I experienced the same problem when installing stripe payment system but that solved my problem.