安装php5-geoap失败


installing php5-geoip fails

当我试图在我的debian上安装php5-geoap时,我得到了一个错误:

root@pandora:~# LANG=C apt-get install php5-geoip
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-geoip : Depends: phpapi-20100525
E: Unable to correct problems, you have held broken packages.
root@pandora:~#

当我尝试安装依赖项时,这里是输出:

root@pandora:~# LANG=C apt-get install phpapi-20100525
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package phpapi-20100525 is a virtual package provided by:
  php5-fpm 5.4.45-0+deb7u2 [Not candidate version]
  php5-cli 5.4.45-0+deb7u2 [Not candidate version]
  php5-cgi 5.4.45-0+deb7u2 [Not candidate version]
  libphp5-embed 5.4.45-0+deb7u2 [Not candidate version]
  libapache2-mod-php5filter 5.4.45-0+deb7u2 [Not candidate version]
  libapache2-mod-php5 5.4.45-0+deb7u2 [Not candidate version]
E: Package 'phpapi-20100525' has no installation candidate
root@pandora:~#

apt-get-update和apt-get-upgrade都不需要更新或安装。我可以安装任何其他软件包。

如果有人愿意帮助我,谢谢:-)

从您收到的错误来看,您没有与当前PHP包匹配的可用包。你有两个选择。首先,你可以使用新的PHP版本(不需要编译代码。)如果你已经为你的项目安装了composer,你可以很容易地做到这一点:

php composer.phar require geoip2/geoip2:~2.0

或者,第二种选择是安装PECL的原始软件包。假设您已经安装了适当的PEAR包,并且有可用的开发工具(例如makegcc),您可以尝试以下步骤:

apt-get install libgeoip-dev
pecl install geoip

请参阅此处或此处了解更多详细信息。