Reputation: 375
Hi guys I am trying to insall php GD library by using sudo apt-get install php5-gd command. But it says unmet dependencies. Here is the output.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php5-gd : Depends: php5-common (= 5.4.6-1ubuntu1) but 5.4.6-1ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.
Any help??
Upvotes: 0
Views: 9530
Reputation: 1
Try to use aptitude command instead of apt-get, which deals with dependencies better than apt-get:
sudo aptitude install php5-gd
It should help you downgrade the bothering package.
(Answer from maverickaddicted on http://ubuntuforums.org)
Upvotes: 0
Reputation: 1745
Check if it exist in /etc/apt/preferences.d/php5_3 file ...
I've added the following:
Package: php5-gd
Pin: release a=precise
Pin-Priority: 991
After that:
apt-get update
apt-get install php5-gd
Check with:
php -m |grep gd
Restart your apache.
Upvotes: 0
Reputation: 2622
Check your repositories
cat /etc/apt/sources.list
if you have no different versions, try to update packages list:
sudo apt-get update
and than try to install php5-gd
Upvotes: 2