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

安装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 :-)

图片转代码服务由CSDN问答提供 功能建议

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

  root @ pandora:〜#LANG = C apt-get install php5-geoip 
读取包列表...完成
建立依赖关系树
读取状态信息...完成
无法安装某些软件包 。 这可能意味着您已经发现了一个不可能的情况,或者如果您正在使用不稳定的
分发,但尚未创建某些必需的包,也未将其移出Incoming。
以下信息可能有助于解决此问题:
  
以下软件包具有未满足的依赖关系:
 php5-geoip:取决于:phpapi-20100525 
E:无法纠正问题,您已经破坏了软件包。
root @ pandora:〜#
    
 
 

当我尝试安装依赖项时,输出如下:

  root @ pandora:〜#LANG = C apt-get install phpapi-20100525  
读取包列表...完成
建立依赖关系树
读取状态信息...完成
Package phpapi-20100525是一个虚拟包提供者:
 php5-fpm 5.4.45-0 + deb7u2 [非候选版本] \  n php5-cli 5.4.45-0 + deb7u2 [非候选版] 
 php5-cgi 5.4.45-0 + deb7u2 [非候选版] 
 libphp5-embed 5.4.45-0 + deb7u2 [非候选版]  
 libapache2-mod-php5filter 5.4.45-0 + deb7u2 [不是 idate version] 
 libapache2-mod-php5 5.4.45-0 + deb7u2 [非候选版] 
 
E:包'phpapi-20100525'没有安装候选
root @pandora:〜#
    
 
 

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

谢谢 任何人都接受帮助我: - )

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

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.

    点赞 打赏 评论

相关推荐 更多相似问题