![Debian 7.0 无法安装 php5-dev 软件包](https://linux22.com/image/82931/Debian%207.0%20%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%20php5-dev%20%E8%BD%AF%E4%BB%B6%E5%8C%85.png)
尝试在 debian 中安装时,显示libssl-dev
需要依赖项
apt-get 安装 php5-dev
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-dev : Depends: libssl-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
安装libssl-dev
包需要依赖zlib1g-dev
。安装zliblg-dev
包已取消依赖项,
The following packages have unmet dependencies:
zlib1g-dev : Depends: zlib1g (= 1:1.2.3.4.dfsg-3) but 1:1.2.7.dfsg-13 is to be installed
安装包如何zlib1g-dev
安装dev5-php
?
答案1
您可以通过键入以下内容来安装它:
su -c 'aptitude install libssl-dev'
如果没有完成,请分享输出
apt-cache show libssl-dev
答案2
从目录发布您的文本:/etc/apt/sources.list
以查看存储库列表是否足够。请参阅关联,这可能值得一看。
答案3
我在存储库文件中添加了以下几行:/etc/apt/sources.list
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
deb http://http.us.debian.org/debian jessie main contrib non-free
更新后:apt-get update
通过添加上述行,我可以php5-dev
成功安装该软件包!