安装php5-geoip失败

时间:2016-04-15 08:26:15

标签: php geoip

当我尝试在我的debian上安装php5-geoip时,出现错误:

component.center()
component.setPosition(x, y)
component.setPositionX(x)
component.setPositionY(y)

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

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:~#

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

谢谢,如果有人接受帮助我: - )

1 个答案:

答案 0 :(得分:0)

根据您获得的错误,您没有可用的软件包与您当前的PHP软件包匹配。你有两个选择。首先,您可以使用the new PHP version(无需编译代码。)如果您已为项目安装了编写器,则可以轻松完成此操作:

php composer.phar require geoip2/geoip2:~2.0

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

apt-get install libgeoip-dev
pecl install geoip

有关详细信息,请参阅herehere