0

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"

Thanks

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

dynamic
  • 730
  • 6
  • 17
  • 31

3 Answers3

1

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.

John Gardeniers
  • 27,262
  • 12
  • 53
  • 108
0

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.

Pang
  • 273
  • 3
  • 8
Richard Keller
  • 2,270
  • 2
  • 18
  • 31
0

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

/etc/portage/package.provided

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.

laebshade
  • 806
  • 5
  • 11