Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have PHP 5.2 and Gentoo base system version 1.6.14

I launched: emerge dev-php5/pecl-apc

But it failed at:

 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking APC-3.0.16.tgz ;-) ...                                        [ ok ]
 * ERROR: dev-php5/pecl-apc-3.0.16-r1 failed.
 * Call stack:
   [call stack]
    die "Unable to find an installed dev-lang/php package"


Please note this Gentoo was preinstalled to this dedicated server by OVH. Maybe there is other cmd than emerge?

share|improve this question

Unable to find an installed dev-lang/php package"

Ummm... It looks to me like you need to install a dependency. Perhaps even the one listed in that message. I don't know whether or not the emerge command should have done that for you (never used it myself) but regardless, it appears to be missing.

share|improve this answer

This looks like a typical issue of a package having been installed from source rather than using Portage (which is the correct way of installing packages - you should never install directly from source). You should first check whether Portage has any record of PHP and Apache having been installed through it.

eix www-servers/apache
eix dev-lang/php

If installed through Portage rather than from source, both of these packages should return a record with an "Installed versions" version listed.

If Portage has no record of this, I suggesting finding some way of getting rid of the existing installation of Apache and PHP. This won't be trivial, since if installed from source, there's no quick and easy way of finding all the required files to remove. It may be safe to simply find the main binaries and general configuration files and try removing those. Once you've removed the existing installation, install PHP and Apache through Portage as follows:

emerge -av www-servers/apache
emerge -av dev-lang/php

See this existing question for full instructions on installing Apache and PHP with APC support.

share|improve this answer

If you really do have a working PHP install, you can tell Portage you do by adding the appropriate lines to:


See: "Gentoo Handbook x86"

For more info.

As Richard Keller's statement that:

This won't be trivial, since if installed from source, there's no quick and easy way of finding all the required files to remove

If you really do want to get rid of your existing Apache/PHP install, and you still have the source from where you installed it, first you need to stop Apache, then cd to the source directories, and type:make uninstall

You can then emerge Apache and PHP through Portage.

share|improve this answer

Your Answer


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.