I try to installhirak/prestissimo packages because my composer is very very very slow.
I use
composer global require hirak/prestissimo
But I got this error. I found another solution on StackOverflow but I still can't fix that.
Problem 1
- Installation request for hirak/prestissimo ^0.3.6 -> satisfiable by hirak/prestissimo[0.3.6].
- hirak/prestissimo 0.3.6 requires ext-curl * -> the requested PHP extension curl is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/5.6/cli/php.ini
- /etc/php/5.6/cli/conf.d/10-mysqlnd.ini
- /etc/php/5.6/cli/conf.d/10-opcache.ini
- /etc/php/5.6/cli/conf.d/10-pdo.ini
- /etc/php/5.6/cli/conf.d/15-xml.ini
- /etc/php/5.6/cli/conf.d/20-calendar.ini
- /etc/php/5.6/cli/conf.d/20-ctype.ini
- /etc/php/5.6/cli/conf.d/20-dom.ini
- /etc/php/5.6/cli/conf.d/20-exif.ini
- /etc/php/5.6/cli/conf.d/20-fileinfo.ini
- /etc/php/5.6/cli/conf.d/20-ftp.ini
- /etc/php/5.6/cli/conf.d/20-gd.ini
- /etc/php/5.6/cli/conf.d/20-gettext.ini
- /etc/php/5.6/cli/conf.d/20-iconv.ini
- /etc/php/5.6/cli/conf.d/20-json.ini
- /etc/php/5.6/cli/conf.d/20-mbstring.ini
- /etc/php/5.6/cli/conf.d/20-mcrypt.ini
- /etc/php/5.6/cli/conf.d/20-mysql.ini
- /etc/php/5.6/cli/conf.d/20-mysqli.ini
- /etc/php/5.6/cli/conf.d/20-pdo_mysql.ini
- /etc/php/5.6/cli/conf.d/20-phar.ini
- /etc/php/5.6/cli/conf.d/20-posix.ini
- /etc/php/5.6/cli/conf.d/20-readline.ini
- /etc/php/5.6/cli/conf.d/20-shmop.ini
- /etc/php/5.6/cli/conf.d/20-simplexml.ini
- /etc/php/5.6/cli/conf.d/20-sockets.ini
- /etc/php/5.6/cli/conf.d/20-sysvmsg.ini
- /etc/php/5.6/cli/conf.d/20-sysvsem.ini
- /etc/php/5.6/cli/conf.d/20-sysvshm.ini
- /etc/php/5.6/cli/conf.d/20-tokenizer.ini
- /etc/php/5.6/cli/conf.d/20-wddx.ini
- /etc/php/5.6/cli/conf.d/20-xmlreader.ini
- /etc/php/5.6/cli/conf.d/20-xmlwriter.ini
- /etc/php/5.6/cli/conf.d/20-xsl.ini
Thanks you all !!
curl doesnt stay in php.ini
for ubuntu you need install it from terminal
install it like this
sudo apt-cache search php-curl
sudo apt-get install php(version of php you are using)-curl
So far, it's cURL issue. You've to install cURL and enable it.
sudo apt-cache search php-curl and get your version number from there. Install by typing sudo apt-get install php5.6-curl. This should work.
Run this command sudo apt-get install php5-intl
After that run this sudo apt-get update && sudo apt-get upgrade
if this does not work please check your dependencies for the error. It can check using this..firstly type sudo apt-get install php5 on terminal after that enter the tab..Then you can see the packages.
Try it
sudo apt-get install php5.6-bcmath
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
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
Greetings fellow developers,
I am trying to use composer for a PHP project of mine on a development server I recently booted up and for some reason I am unable to. I successfully installed composer, however, when I try to run the require command I get the following error:
root#webserver:/var/mypersonal/index# composer require php-amqplib/php-amqplib
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_openssl.dll' - /usr/lib/php/20151012/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^2.6 for php-amqplib/php-amqplib
./composer.json has been created
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
- php-amqplib/php-amqplib v2.6.3 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
- php-amqplib/php-amqplib v2.6.2 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
- php-amqplib/php-amqplib v2.6.1 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
- php-amqplib/php-amqplib v2.6.0 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
- Installation request for php-amqplib/php-amqplib ^2.6 -> satisfiable by php-amqplib/php-amqplib[v2.6.0, v2.6.1, v2.6.2, v2.6.3].
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-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-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-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, deleting ./composer.json.
I'm assuming it's something to do with the PHP warning I recieve right when running the composer require command but no google search results lead me to the correct direction.
Additionally, I have provided my /etc/php/7.0/cli/php.ini file incase of an error in that file.
https://gist.github.com/anonymous/bc5bac59d684cbf575cef931ef36daf6 (I couldn't include the file in this post due to the character limit on posts.)
Thank you.
You can use function get_loaded_extensions to see if bcmath modul is loaded. Or in terminal php -m or php -m | grep name_of_the_modul
You can install it depending on what OS you are using:
Ubuntu
sudo apt install php7.0-bcmath
CentOS
yum install bcmath
PHP 7.2
Debian - jessie
apt-get update
apt-get install php7.2-bcmath
work like a charm :)
For any version in php Centos use
This solution worked for me
yum install php-bcmath
PHP will take the default version installed in the machine, search for that package and install it.
Delete the file composer.lock file if that is already created and then run again,
composer install
If you run
composer update
it will update whatever default packages are installed in composer.json which might create problem for you.
In Ubuntu 20.04
For php 7.4.3, sudo apt install php7.4-bcmath
For PHP 7.1, the following worked for me:
sudo apt install php7.1-bcmath
If you are using Docker:
bcmath can be installed by running this command inside a container: docker-php-ext-install bcmath
check your php version by type: php --version
you will see something like this:
PHP 7.2.9-1+ubuntu16.04.1 ....
then sudo apt install phpX.X-bcmath where X.X is php version, so for this ^ example it will be sudo apt install php7.2-bcmath
after this check if module existed or not by type php -m | grep bcmath
php 7.2 if you have other version just change it accordingly
For CentOS
sudo yum install php72-bcmath
For Ubuntu
sudo apt install php7.0-bcmath
Run this command, hope it will works
sudo apt-get install php-bcmath
hope this will fix the problem.
sudo apt install php-bcmath
For this problem we should use sudo apt install php-bcmath
Strange thing here
Some month ago I have installed all PHP version in the same manner. In here are the 4 identically configured version of php: 5.6, 7.0, 7.1, 7.2, with the same extensions ( when this was made possible ).
The strange thing was that bcmath is present for all php version excluding 7.1.
In the solution search I arrive here in this question, where the logic's things was confirmed installing bcmath, but in my Linode Debian 9 server the command
apt install php7.1-bcmath
doesn't work, with 3 error messages;
E: Impossible to find the package php7.1-bcmath
E: Impossible to find some package with glob "php7.1-bcmath"
E: Impossible to find a package with the regular expression "php7.1-bcmath"
The goals no meet with any combination of tips and trick, refreshing apt cache, change Debian's mirrored server, installing yum, so on...
After some tentatives I had an illumination: modificating of /etc/apt/sources.list enabling the default Linode repository, then after an apt update (with no solution in the immediate), I have restored the /etc/apt/sources.list commenting out the Linode mirror sources again. Magically, after the new apt update the command now are working.
By this I confirm: apt install php7.1-bcmath is the right command, but your Debian can need a kick in the ass
Install with this command, thats work for me
apt-get install php-bcmath
I tried below package and it worked in Php version 5.6
yum install php56w-bcmath
For those who have already tried installing bc-math and still composer is giving errors.
Try this command
rm composer.lock
It will definitely work