# apt install libcurl3
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
virtualbox-6.0 : Depends: libfontconfig1 (>= 2.11.94) but it is not going to be installed
Depends: libgl1-mesa-glx but it is not going to be installed or
libgl1
Depends: libice6 (>= 1:1.0.0) but it is not going to be installed
Depends: libopus0 (>= 1.1) but it is not going to be installed
Depends: libsdl1.2debian (>= 1.2.11) but it is not going to be installed
Depends: libsm6 but it is not going to be installed
Depends: libvpx3 (>= 1.5.0) but it is not going to be installed
Depends: libx11-xcb1 but it is not going to be installed
Depends: libxcursor1 (> 1.1.2) but it is not going to be installed
Depends: libxmu6 but it is not going to be installed
Depends: libxrender1 but it is not going to be installed
Depends: libxt6 but it is not going to be installed
Recommends: libasound2
Recommends: libpulse0 but it is not going to be installed
Recommends: libsdl-ttf2.0-0 but it is not going to be installed
Recommends: gcc but it is not going to be installed
Recommends: make or
build-essential but it is not going to be installed or
dpkg-dev but it is not going to be installed
Recommends: binutils but it is not going to be installed
Recommends: pdf-viewer
Recommends: libgl1
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
造成这种问题的原因是因为在Ubuntu下,例如Ubuntu 14.04或者16.04一般是不会出现broken dependencies,或者出现unmet dependencies, 但是如果我们使用dpkg强制安装了某些deb包,或者在build-dep的是否手动更改了某些Packages的文件和版本时, 那么在再次使用apt-get install或者build-dep来安装packages的时就很可能出现上面出现过的问题。
我们可以根据提示执行下命令,如果问题照旧,那我们尝试执行一下命令
first step
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade
second step
sudo apt-get update
sudo apt-get clean
sudo apt-get autoremove
third step
sudo apt --fix-broken install
sudo apt-get update && sudo apt-get upgrade
sudo dpkg --configure -a
sudo apt-get install -f
执行完以上步骤后,基本上问题便能解决