Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So, I'm trying to install the PHP5 cURL package on a Ubuntu Lucid 10.04.3 server. My concern is that there are broken packages on this server and if I install this package with the broken packages that it may mess up PHP or Apache.

I've already tried sudo apt-get clean and sudo dpkg --configure -a; sudo apt-get -f install but the broken packages are still there.

If just do a sudo aptitude install php5-curl do you think this will affect MySQL or anything else that uses PHP5?

Output of sudo aptitude install php5-curl:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages are BROKEN:
  php5-cli php5-gd php5-mysql php5-xmlrpc
The following NEW packages will be installed:
  php5-curl
The following packages will be upgraded:
  libapache2-mod-php5 php5-common
2 packages upgraded, 1 newly installed, 0 to remove and 101 not upgraded.
Need to get 3571kB of archives. After unpacking 2621kB will be used.
The following packages have unmet dependencies:
  php5-gd: Depends: php5-common (= 5.2.10.dfsg.1-2ubuntu6) but 5.3.2-1ubuntu4.18 is to be installed.
  php5-xmlrpc: Depends: php5-common (= 5.2.10.dfsg.1-2ubuntu6) but 5.3.2-1ubuntu4.18 is to be installed.
  php5-mysql: Depends: php5-common (= 5.2.10.dfsg.1-2ubuntu6) but 5.3.2-1ubuntu4.18 is to be installed.
  php5-cli: Depends: php5-common (= 5.2.10.dfsg.1-2ubuntu6) but 5.3.2-1ubuntu4.18 is to be installed.
The following actions will resolve these dependencies:

Install the following packages:
php5-curl [5.2.10.dfsg.1-2ubuntu6 (karmic)]

Keep the following packages at their current version:
libapache2-mod-php5 [5.2.10.dfsg.1-2ubuntu6 (karmic, now)]
php5-common [5.2.10.dfsg.1-2ubuntu6 (karmic, now)]

Score is -9900

Accept this solution? [Y/n/q/?]
share|improve this question

1 Answer 1

up vote 2 down vote accepted

Ok here's what I ended up doing:

First of all, I would recommend using aptitude instead of apt-get because it makes better choices by default. So, I went ahead and accepted aptitude's first solution, which was to leave everything the same version except for php5-curl which was to be installed. Trust me, you don't want to update the php5-common or libapache2-mod-php5 packages on a mission-critical server because they have a million dependencies. Then the server couldn't download the package because the repositories are outdated on this server (it's 10.04 remember) and it couldn't find the .deb file. So, I copied the name php5-curl-5.2.10.dfsg.1-2ubuntu6_amd_64.deb and Google'd it and found site hosting the .deb file. I then did the following commands to install this package without causing dependency hell:

$ wget http://www.thesitewhereyoufounditongoogle.com/php5-curl-5.2.10.dfsg.1-2ubuntu6_amd_64.deb

$ sudo dpkg -i php5-curl-5.2.10.dfsg.1-2ubuntu6_amd_64.deb

and then of course restart Apache

$ sudo /etc/init.d/apache2 restart

And voila! cURL was installed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.