The libssl-dev version problem cannot be installed: Depends: libssl 1.0.0 (= 1.0.1t-1 + deb7u2) but 1.0.1t-1 + deb8u6 is to be installed
Problem phenomena:
Error prompted when installing 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: 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 installed E: Unable to correct problems, you have held broken packages.
Solution:
linux version dependency problem is very complicated, but we can solve this dependency problem by using aptitude package manager, aptitude can choose the appropriate version and match the software installation.
First install the aptitude tool
sudo apt-get install aptitude
Using aptitude to install 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/?] n The 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/?] y The 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/?] y Get: 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) ...
So far, the problem solving, later encountered version does not lead to the dependency of the corresponding problem can also be solved by the above method.
Reference address: http://blog.csdn.net/andy812110/article/details/24842219