0

I'm trying to install GMP on Ubuntu 14.04:

$ sudo apt-get install php5-gmp
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-gmp : Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.5) but 5.5.17+dfsg-2+deb.sury.org~precise+1 is to be installed
E: Unable to correct problems, you have held broken packages.

Why is it not letting me install this?

Martyn
  • 6,031
  • 12
  • 55
  • 121
  • Googling "Unable to correct problems, you have held broken packages." brings me to the helpful http://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages – ceejayoz Jan 09 '15 at 14:30
  • sudo apt-get install php5-common php5-gmp – geggleto Jan 09 '15 at 14:31

2 Answers2

2

somehow you have installed a special version of php-common (= 5.5.17+dfsg-2+deb.sury.org~precise+1) try to

apt-get remove php5-common 

and then install again.

cari
  • 2,251
  • 2
  • 18
  • 27
0

Your installation appears to be broken by php5-common-5.5.17+dfsg-2+deb.sury.org~precise+1 package installed from some alien repo.

Try to start with:

sudo apt-search php5

remove everything looking suspicious and then reinstall it from the official repo. I think, simple removal of this alien common and reinstalling gmp might resolve an issue.

Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160