libssl-dev版本问题无法安装 : Depends: libssl1.0.0 (= 1.0.1t-1+deb7u2) but 1.0.1t-1+deb8u6 is to be installed

来源:互联网 发布:最伟大德国人知乎 编辑:程序博客网 时间:2024/06/05 08:51

问题现象:

在安装libssl-dev 的时候提示错误:

sudo apt-get install libssl-devReading package lists... DoneBuilding dependency tree       Reading state information... DoneSome packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation:The following packages have unmet dependencies: libssl-dev : Depends: libssl1.0.0 (= 1.0.1t-1+deb7u2) but 1.0.1t-1+deb8u6 is to be installed              Recommends: libssl-doc but it is not going to be installedE: Unable to correct problems, you have held broken packages.



解决方法:

linux的版本依赖问题很令人纠结,不过我们可以通过使用aptitude软件包管理器来解决这个依赖问题,aptitude是可以选择合适的版本与匹配软件安装。

首先安装aptitude工具

sudo apt-get install aptitude
再利用aptitude来安装libssl-dev

sudo aptitude install libssl-dev
The following NEW packages will be installed:  libssl-dev{b} libssl-doc{a} 0 packages upgraded, 2 newly installed, 0 to remove and 12 not upgraded.Need to get 2,755 kB of archives. After unpacking 6,426 kB will be used.The following packages have unmet dependencies: libssl-dev : Depends: libssl1.0.0 (= 1.0.1t-1+deb7u2) but 1.0.1t-1+deb8u6 is installed.The following actions will resolve these dependencies:     Keep the following packages at their current version:1)     libssl-dev [Not Installed]                         Accept this solution? [Y/n/q/?] nThe following actions will resolve these dependencies:     Downgrade the following packages:                                      1)     libssl1.0.0 [1.0.1t-1+deb8u6 (now) -> 1.0.1t-1+deb7u2 (oldoldstable)]Accept this solution? [Y/n/q/?] yThe following packages will be DOWNGRADED:  libssl1.0.0 The following NEW packages will be installed:  libssl-dev libssl-doc{a} 0 packages upgraded, 2 newly installed, 1 downgraded, 0 to remove and 12 not upgraded.Need to get 3,825 kB of archives. After unpacking 6,420 kB will be used.Do you want to continue? [Y/n/?] yGet: 1 http://mirrors.aliyun.com/raspbian/raspbian/ wheezy/main libssl1.0.0 armhf 1.0.1t-1+deb7u2 [1,070 kB]Get: 2 http://mirrors.aliyun.com/raspbian/raspbian/ wheezy/main libssl-dev armhf 1.0.1t-1+deb7u2 [1,528 kB]Get: 3 http://mirrors.aliyun.com/raspbian/raspbian/ wheezy/main libssl-doc all 1.0.1t-1+deb7u2 [1,227 kB]Fetched 3,825 kB in 5s (753 kB/s)     Preconfiguring packages ...dpkg: warning: downgrading libssl1.0.0:armhf from 1.0.1t-1+deb8u6 to 1.0.1t-1+deb7u2(Reading database ... 115760 files and directories currently installed.)Preparing to unpack .../libssl1.0.0_1.0.1t-1+deb7u2_armhf.deb ...Unpacking libssl1.0.0:armhf (1.0.1t-1+deb7u2) over (1.0.1t-1+deb8u6) ...Selecting previously unselected package libssl-dev.Preparing to unpack .../libssl-dev_1.0.1t-1+deb7u2_armhf.deb ...Unpacking libssl-dev (1.0.1t-1+deb7u2) ...Selecting previously unselected package libssl-doc.Preparing to unpack .../libssl-doc_1.0.1t-1+deb7u2_all.deb ...Unpacking libssl-doc (1.0.1t-1+deb7u2) ...Processing triggers for man-db (2.7.5-1~bpo8+1) ...Setting up libssl1.0.0:armhf (1.0.1t-1+deb7u2) ...Setting up libssl-dev (1.0.1t-1+deb7u2) ...Setting up libssl-doc (1.0.1t-1+deb7u2) ...Processing triggers for libc-bin (2.19-18+deb8u10) ...
此,问题解决,以后遇到版本不对导致依赖不对应的问题也可以采用上述的方法进行解决。


参考地址:http://blog.csdn.net/andy812110/article/details/24842219


阅读全文
0 0
原创粉丝点击