douxianglu4370 2016-04-15 08:26
浏览 147
已采纳

安装php5-geoip失败

When I try to install php5-geoip on my debian, I get an error :

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

When I try to install the dependency, here is the output :

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 and apt-get upgrade both works with nothing to update or install. I can install any other package.

Thanks if anyone accepts to help me :-)

  • 写回答

1条回答 默认 最新

  • dongxiaoyan4388 2016-04-19 23:37
    关注

    From the errors you're getting, you don't have a package available that matches your current PHP package. You have two choices. First, you can use the new PHP version (no compiled code necessary.) If you have composer already installed for your project, you can do this easily:

    php composer.phar require geoip2/geoip2:~2.0
    

    Or, second choice, install the original package from PECL. Assuming you have already installed the appropriate PEAR package, and have development tools available (e.g. make and gcc) you can try these steps:

    apt-get install libgeoip-dev
    pecl install geoip
    

    See here or here for more details.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站