I am trying to install libcairo2-dev
in a Ubuntu 18.04.2 LTS Bionic.
I run :
$ sudo apt-get install libcairo2-de
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:
libcairo2-dev : Depends: libx11-dev but it is not going to be installed
Depends: libxrender-dev (>= 0.6) but it is not going to be installed
Depends: libxext-dev but it is not going to be installed
Depends: libxcb1-dev (>= 1.6) but it is not going to be installed
Depends: libxcb-render0-dev (>= 1.6) but it is not going to be installed
Depends: libxcb-shm0-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Then I try
$ sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
$ sudo apt-get -u dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
But nothing works,
My sources.list :
cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu bionic main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu bionic main universe restricted multiverse #Added by software-properties
deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
Then I tried what guiverc
and StrabagISS_Krall
suggested
sudo apt-get update
Hit:1 http://ppa.launchpad.net/klaus-vormweg/awesome/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://dl.google.com/linux/chrome/deb stable Release
Reading package lists... Done
Then ,
sudo apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
And then ,
sudo apt-get install libcairo2-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:
libcairo2-dev : Depends: libx11-dev but it is not going to be installed
Depends: libxrender-dev (>= 0.6) but it is not going to be installed
Depends: libxext-dev but it is not going to be installed
Depends: libxcb1-dev (>= 1.6) but it is not going to be installed
Depends: libxcb-render0-dev (>= 1.6) but it is not going to be installed
Depends: libxcb-shm0-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
In fact, I check the version of each dependency they are there with the last version.
$ apt-cache showpkg libx11-dev
Package: libx11-dev
Versions:
2:1.6.4-3ubuntu0.2 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-updates_main_binary-amd64_Packages)
$ apt-cache showpkg libxrender-dev
Package: libxrender-dev
Versions:
1:0.9.10-1 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic_main_binary-amd64_Packages)
N0rbert suggested to recreate the repository list, but when I run sudo apt-get update none of the repositories fail to fetch, see above. But anyway I tried to recreate the repository list as suggest in How do I restore the default repositories? but did not work.
sudo apt update
do you get expected results? I'd suggest doing that first, then letting your system upgrade fully, reboot and re-try (butsudo apt update
is your first response, & read messages; lack of messages is a huge clue!) – guiverc Apr 21 '20 at 06:54aptitude
solutions. Any things else just record what you tried and report back on this question, link of answer and result. – user.dz Apr 21 '20 at 12:35