Installing libcurl4-openssl-dev encounters the solution that the dependent package cannot be installed

  • Operating system: ubuntu20.04

error phenomenon

When I use the down command to install the curl development package, generally speaking, the one-click installation is successful, but sometimes unexpected problems may occur.

sudo apt-get install libcurl4-openssl-dev

I encountered the following problems in ubuntu20.04, which caused the installation to fail:

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:
 libcurl4-openssl-dev : Depends: libcurl4 (= 7.58.0-2ubuntu3.24) but 7.68.0-1ubuntu2.14 is to be installed
E: Unable to correct problems, you have held broken packages.

According to the prompt, it should be that the version number of the dependent package libcurl4 is 7.58.0-2ubuntu3.24, but the system needs to install 7.68.0-1ubuntu2.14, which causes the dependency package of libcurl4-openssl-dev to fail, and finally leads to installation failed.

Solution

According to the prompt, libcurl version 7.58.0-2ubuntu3.24 should be installed to be installed successfully. This version must be installed, so how to specify the version number to install? As follows:

sudo apt-get -f install libcurl4=7.58.0-2ubuntu3.24

Execute the command, the following prompt appears:

nvidia@ubuntu:~/git/deepbox$ sudo apt-get -f install libcurl4=7.58.0-2ubuntu3.24
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dctrl-tools dpkg-repack gdal-data gir1.2-gst-plugins-bad-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common
  libaec0 libarmadillo9 libarpack2 libavcodec-dev libavformat-dev libavresample-dev libavresample4 libavutil-dev libcfitsio8 libcharls2 libdap25 libdapclient6v5 libdc1394-22-dev
  libdebian-installer4 libepsilon1 libexif-dev libfreexl1 libfyba0 libgdal26 libgdcm-dev libgdcm3.0 libgeos-3.8.0 libgeos-c1v5 libgeotiff5 libgl2ps1.4 libgphoto2-dev libhdf4-0-alt
  libhdf5-103 libhdf5-openmpi-103 libilmbase-dev libjbig-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libkmlbase1 libkmldom1 libkmlengine1 liblept5 liblzma-dev libminizip1
  libnetcdf-c++4 libnetcdf15 libodbc1 libogdi4.1 libopenexr-dev libpng-dev libpq5 libproj15 libqhull7 libraw1394-dev libsocket++1 libspatialite7 libsuperlu5 libswresample-dev
  libswscale-dev libsz2 libtesseract4 libtiff-dev libtiffxx5 libtimezonemap-data libtimezonemap1 liburiparser1 libvtk6.3 libxerces-c3.2 odbcinst odbcinst1debian2 os-prober proj-data
  python3-icu python3-pam rdate tasksel tasksel-data
Use 'sudo apt autoremove' to remove them.
The following packages will be DOWNGRADED:
  libcurl4
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 35 not upgraded.
Need to get 185 kB of archives.
After this operation, 82.9 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates/main arm64 libcurl4 arm64 7.58.0-2ubuntu3.24 [185 kB]
Fetched 185 kB in 1s (307 kB/s)  
debconf: delaying package configuration, since apt-utils is not installed
dpkg: warning: downgrading libcurl4:arm64 from 7.68.0-1ubuntu2.14 to 7.58.0-2ubuntu3.24
(Reading database ... 162060 files and directories currently installed.)
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3.24_arm64.deb ...
Unpacking libcurl4:arm64 (7.58.0-2ubuntu3.24) over (7.68.0-1ubuntu2.14) ...
Setting up libcurl4:arm64 (7.58.0-2ubuntu3.24) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

The installation is successful, and then execute the following command:

sudo apt-get install libcurl4-openssl-dev

The following prompt appears:

nvidia@ubuntu:~/git/deepbox$ sudo apt-get install libcurl4-openssl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dctrl-tools dpkg-repack gdal-data gir1.2-gst-plugins-bad-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common
  libaec0 libarmadillo9 libarpack2 libavcodec-dev libavformat-dev libavresample-dev libavresample4 libavutil-dev libcfitsio8 libcharls2 libdap25 libdapclient6v5 libdc1394-22-dev
  libdebian-installer4 libepsilon1 libexif-dev libfreexl1 libfyba0 libgdal26 libgdcm-dev libgdcm3.0 libgeos-3.8.0 libgeos-c1v5 libgeotiff5 libgl2ps1.4 libgphoto2-dev libhdf4-0-alt
  libhdf5-103 libhdf5-openmpi-103 libilmbase-dev libjbig-dev libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libkmlbase1 libkmldom1 libkmlengine1 liblept5 liblzma-dev libminizip1
  libnetcdf-c++4 libnetcdf15 libodbc1 libogdi4.1 libopenexr-dev libpng-dev libpq5 libproj15 libqhull7 libraw1394-dev libsocket++1 libspatialite7 libsuperlu5 libswresample-dev
  libswscale-dev libsz2 libtesseract4 libtiff-dev libtiffxx5 libtimezonemap-data libtimezonemap1 liburiparser1 libvtk6.3 libxerces-c3.2 odbcinst odbcinst1debian2 os-prober proj-data
  python3-icu python3-pam rdate tasksel tasksel-data
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev libssl-dev
The following NEW packages will be installed:
  libcurl4-openssl-dev
0 upgraded, 1 newly installed, 0 to remove and 35 not upgraded.
Need to get 276 kB of archives.
After this operation, 1,339 kB of additional disk space will be used.
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates/main arm64 libcurl4-openssl-dev arm64 7.58.0-2ubuntu3.24 [276 kB]
Fetched 276 kB in 1s (551 kB/s)              
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libcurl4-openssl-dev:arm64.
(Reading database ... 162060 files and directories currently installed.)
Preparing to unpack .../libcurl4-openssl-dev_7.58.0-2ubuntu3.24_arm64.deb ...
Unpacking libcurl4-openssl-dev:arm64 (7.58.0-2ubuntu3.24) ...
Setting up libcurl4-openssl-dev:arm64 (7.58.0-2ubuntu3.24) ...
Processing triggers for man-db (2.9.1-1) ...

Oye, the installation is successful, write down this method, I hope I can find this article next time I encounter this problem, and copy it directly to solve it.

Je suppose que tu aimes

Origine blog.csdn.net/jndingxin/article/details/130615459
conseillé
Classement