安装php5 geoip失败

安装php5 geoip失败,php,geoip,Php,Geoip,当我尝试在我的debian上安装php5 geoip时,我得到一个错误: 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 requeste

当我尝试在我的debian上安装php5 geoip时,我得到一个错误:

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 update都可以在无需更新或安装的情况下工作。 我可以安装任何其他软件包


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

从您收到的错误中,您没有与当前PHP包匹配的可用包。你有两个选择。首先,您可以使用(无需编译代码)。如果您已经为项目安装了composer,则可以轻松地执行此操作:

php composer.phar require geoip2/geoip2:~2.0
或者,第二种选择,从安装原始软件包。假设您已经安装了相应的PEAR软件包,并且有可用的开发工具(例如
make
gcc
),您可以尝试以下步骤:

apt-get install libgeoip-dev
pecl install geoip

有关更多详细信息,请参阅或。

提示:运行
LANG=C
以使输出为英语。感谢您的回答,我确实使用英语输出编辑了我的第一条消息!“php5 geoip:依赖项:phpapi-20100525”您有这种依赖项吗?它是否需要您没有的特定版本的PHP?我已经尝试安装此依赖项。但它不起作用。我将编辑我的第一篇文章,向您展示输出。因此,我猜PHP5.4.45与您现在安装的版本不同。简而言之,没有php5 geoip包可供使用。