Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install phpmyadmin on a server. Unfortunately, I get the following error:

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:
 phpmyadmin : Depends: php5-mcrypt but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And here is the output when I try to install php5-mcrypt:

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-mcrypt : Depends: phpapi-20100525
               Depends: php5-common (= 5.4.17-5+debphp.org~precise+1) but 5.5.0-1ubuntu2~raring2~precise1 is to be installed
E: Unable to correct problems, you have held broken packages.

I tried (tentatively) following the directions on this site, but I really cannot break anything on this server. My question has a number of parts:

First, what exactly does the Depends: information mean? When it say = 5.4.17 etc, do I need exactly that version?

Second, how do I ensure that if I mess something up, I can "rollback" to a previous state? How likely is that? I have the packages php5 and apache2 on hold just in case, but I think I should also save the config files. Is this the case? Are there specific config files I should back up?

Finally, how do I actually fix this problem? What (safe) steps should I take to get phpmyadmin installed?

UPDATES:

I should note that I only have a command line available to me.

The output of apt-cache policy php5-common is:

php5-common:
  Installed: 5.5.0-1ubuntu2~raring2~precise1
  Candidate: 5.5.0-1ubuntu2~raring2~precise1
  Version table:
 *** 5.5.0-1ubuntu2~raring2~precise1 0
        500 http://ppa.launchpad.net/zanfur/php5.5/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     5.4.17-5+debphp.org~precise+1 0
        500 http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/ precise/main amd64 Packages
     5.3.10-1ubuntu3.7 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     5.3.10-1ubuntu3 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
share|improve this question
What is the output of apt-cache policy php5-common? – jordanm Aug 21 at 17:02
That's really interesting. I wish I had known about that command earlier. I still have no idea what to do with that info.... – MirroredFate Aug 21 at 17:05

1 Answer

The problem is you have included two seperate PPAs for PHP. You have installed PHP5 using the PPA from "zanfur" but its php-mcrypt has an older version than the one from "ondrej".

If you remove the PPA for ondrej, you should get the version from the repo that you have installed PHP from (although, it doesn't appear to be a correct version either).

share|improve this answer
The ppa from ondrej that I have been using is his old stable. I added his new one and and am considering grabbing mcrypt from there. The real problem I face with ondrej is that I need version 5.5.0, and he has 5.5.1. Blah. – MirroredFate Aug 21 at 17:31

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.