安装 libssl-dev 失败

安装 libssl-dev 失败

我正在 Debian 机器上工作并尝试安装 libssl-dev,但尝试时出现以下错误。有人有解决方案吗?

# sudo apt-get install libssl-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:  
  libssl-dev: Depends: libssl0.9.8 (= 0.9.8g-15+lenny13) but 0.9.8o-4~bpo50+1 is to be installed  
E: Broken packages

答案1

未满足的依赖关系语句是这里的关键。看来 -dev 包所需的 libssl 版本与您所使用的存储库上可用的版本不匹配。两者的发行版规范不同(lenny vs bpo),您确定您的存储库设置正确吗?您可以尝试为两者明确指定版本号(相同):

sudo apt-get install libssl-dev=0.9.8g-15+lenny13 libssl0.9.8=0.9.8g-15+lenny13

如果存储库中没有该版本,请查看存储库并选择一个版本。

答案2

看起来您在软件包中遇到了一些代际差异 - 您libssl-dev似乎正尝试从 lenny 的主软件包存储库进行安装,而libssl0.9.8看起来它已经从 backports 安装好了。

您需要通过获取版本而不发生冲突来解决此问题 - 您从和中获得什么apt-cache policy libssl-devapt-cache policy libssl0.9.8并且您知道为什么首先安装这个反向移植版本吗?

相关内容