0

I upgraded to 12.10 from 12.04 and began getting gateway errors when I accessed phppgadmin via nginx. After looking around I realised that the required program php5-fpm wasn't running and further what appeared to be the required executable /usr/sbin/php5-fpm had disappeared.

When I try to re-install it, it gives:

Package php5-fpm 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-fpm' has no installation candidate

The only uncommented lines from sources.list were:

deb http://extras.ubuntu.com/ubuntu quantal main #Third party developers repository
deb http://archive.ubuntu.com/ubuntu quantal main

aptitude search php5-fpm gave this:

c   php5-fpm     - server-side, HTML-embedded scripting language (FPM-CGI binary)

however, I would note that several lines were emitted, perhaps without a line feed to the terminal which I was unable to redirect to a place where I could read them.

The question is: if aptitude is able to find this package via aptitude search what about that package disqualifies it for installation on this system? How to find the correct source for the package?

4
  • 1
    It may happen because of the broken packages, or packages with unmet dependencies. So try to fix it first then try to install. You can find how to fix here: askubuntu.com/questions/338205/… I am not sure whether it will fix your problem, but at least you can give a try. Aug 29, 2013 at 16:14
  • Are you sure your /etc/apt/sources.list contain just that two lines? If this is true, then you have found the source of this and many other problems. Aug 29, 2013 at 16:35
  • 1
    php5-fpm is a Universe package. If you do not enable 'universe' in your system then it will not be there. Paste the entire content of your sources.list file please, and add it to your question, because it's likely the universe and multiverse lines are commented, and with the full /etc/apt/sources.list we can help you more.
    – Thomas Ward
    Aug 30, 2013 at 21:24
  • Those are all the uncommented lines from the file. The commented lines refer to lucid instead of quantal and I assume they have no value. At present the file is a mess and will only confuse matters. I tried Saurav's commands and they had no effect.
    – albe
    Aug 30, 2013 at 21:58

1 Answer 1

1

I was able to solve this but I am not exactly sure how. I don't really understand the apt system.

Apparently the 'c' at the beginning of the aptitude search response means that the package was removed but left some configuration information behind. I guess Saurav's commands should have corrected this and I am not sure why they didn't.

I added several entries into sources.list but I found this one at packages.ubuntu.com/php5-fpm:

deb http://security.ubuntu.com/ubuntu quantal-security main universe

(maybe that's two, but note that Thomas W's universe is in there, but the rest of the php packages drew from main)

I then updated the package list in interactive aptitude (which I only discovered now - I don't have access to synaptics). In aptitude, php5-fpm at first showed up in 'Not Installed Packages \ php \ main' and after the update that disappeared and it showed up under '... \ php \ universe' at which point the install successfully reinstalled all the php packages.

There must have been some incompatibility between the version that was stuck in my system (whose version was different from that of php5) and the versions available in the repositories (also lacking universe, at least). Something I did in aptitude (I assume the update but I didn't record all I did) must have removed the old information. I think if I had followed Saurev's suggestion after adding the correct source it would have worked. Thanks, Thomas and Saurev, for your suggestions.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .