Amirali roshanaei Amirali roshanaei - 4 years ago 254
Linux Question

PHP5-Curl install error no installation candidate

I want to install

in my Debian server. But when I run this command:

apt-get install PHP5-Curl

I get an error like:

Reading package lists... Done
Building dependency tree
Reading state information... Done

Package PHP5-Curl is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'PHP5-Curl' has no installation candidate

Answer Source

It looks like you have multiple, conflicting versions of PHP installed. First, let's clean up. Back up your configuration files first, as this will remove them.

dpkg --purge --force-all php5-curl
apt-get remove php5-*
apt-get purge php5-*
apt-get autoremove

Now, run dpkg -l | grep php5 again, and make sure that no php5-... packages are installed.

Then, let's start fresh:

apt-get install php5-cli php5-curl

If you need the Apache module:

apt-get install libapache2-mod-php5

Or if you need the FPM module:

apt-get install php5-fpm
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download