Ubuntu installation libssl-dev failed (to rely on management aptitude downgrade software) and install the software list shows record dpkg

Ubuntu 12.04LTS installed directly under libssl-dev failed

 

Tip error:

$ 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.1-4ubuntu5) but 1.0.1-4ubuntu5.3 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.
 

 

the reason:

Installed libssl1.0.0 version too high to support

$dpkg -l *libssl*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name               Version            Description
+++-==================-==================-====================================================
un  libssl-dev         <none>             (no description available)
un  libssl-doc         <none>             (no description available)
ii  libssl1.0.0        1.0.1-4ubuntu5.3   SSL shared libraries
 

 

solution:

Using aptitude package manager

1. Install aptitude

$sudo apt-get install aptitude
 

2. Using aptitude install libssl-dev package, adopted the proposed solution (the libssl1.0.0 version downgrade)

$sudo aptitude install libssl-dev
The following NEW packages will be installed:
  libssl-dev{b}
The following packages are RECOMMENDED but will NOT be installed:
  libssl-doc
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,528 kB of archives. After unpacking 6,179 kB will be used.
The following packages have unmet dependencies:
 libssl-dev : Depends: libssl1.0.0 (= 1.0.1-4ubuntu5) but 1.0.1-4ubuntu5.3 is installed.
              Depends: zlib1g-dev but it is not going to be 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:
     Install the following packages:                                          
1)     zlib1g-dev [1:1.2.3.4.dfsg-3ubuntu4 (precise)]                         
     Downgrade the following packages:                                        
2)     libssl1.0.0 [1.0.1-4ubuntu5.3 (now) -> 1.0.1-4ubuntu5 (precise-updates)]
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 zlib1g-dev{a}
The following packages are RECOMMENDED but will NOT be installed:
  libssl-doc
0 packages upgraded, 2 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 2,707 kB of archives. After unpacking 6,575 kB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 http://mirror.lupaworld.com/ubuntu/ precise-updates/main libssl1.0.0 amd64 1.0.1-4ubuntu5 [1,013 kB]
Get: 2 http://mirror.lupaworld.com/ubuntu/ precise/main zlib1g-dev amd64 1:1.2.3.4.dfsg-3ubuntu4 [165 kB]
Get: 3 http://mirror.lupaworld.com/ubuntu/ precise-updates/main libssl-dev amd64 1.0.1-4ubuntu5 [1,528 kB]
Fetched 2,707 kB in 5s (503 kB/s)      
Preconfiguring packages ...
dpkg: warning: downgrading libssl1.0.0 from 1.0.1-4ubuntu5.3 to 1.0.1-4ubuntu5.
(Reading database ... 150648 files and directories currently installed.)
Preparing to replace libssl1.0.0 1.0.1-4ubuntu5.3 (using .../libssl1.0.0_1.0.1-4ubuntu5_amd64.deb) ...
Unpacking replacement libssl1.0.0 ...
Setting up libssl1.0.0 (1.0.1-4ubuntu5) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Selecting previously unselected package zlib1g-dev.
(Reading database ... 150648 files and directories currently installed.)
Unpacking zlib1g-dev (from .../zlib1g-dev_1%3a1.2.3.4.dfsg-3ubuntu4_amd64.deb) ...
Selecting previously unselected package libssl-dev.
Unpacking libssl-dev (from .../libssl-dev_1.0.1-4ubuntu5_amd64.deb) ...
Processing triggers for man-db ...
Setting up zlib1g-dev (1:1.2.3.4.dfsg-3ubuntu4) ...
Setting up libssl-dev (1.0.1-4ubuntu5) ...
 

Verify libssl-dev package installation:

$dpkg -l *libssl*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name               Version            Description
+++-==================-==================-====================================================
ii  libssl-dev         1.0.1-4ubuntu5     SSL development libraries, header files and document
un  libssl-doc         <none>             (no description available)
ii  libssl1.0.0        1.0.1-4ubuntu5     SSL shared libraries

Guess you like

Origin www.cnblogs.com/wangshaowei/p/11229310.html