can't load libxcb-shm0-dev into bionic 18.04.4

Asked by James Robert Gilbert on 2020-11-18

Learning Linux & trying to get GTK into 18.04.4 but libgtk-3-dev requires libcairo2-dev; libcairo2-dev requires libxcb-shm0-dev.
Libxcb-shm0-dev is not automatically loaded as a dependency to libcairo2-dev. see:
jim-u2@jimu2-T480s:~$ sudo apt install libxcb-shm0-dev
[sudo] password for jim-u2:
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:
 libxcb-shm0-dev : Depends: libxcb-shm0 (= 1.13-1) but 1.13-2~ubuntu18.04 is to be installed
E: Unable to correct problems, you have held broken packages.
My bionic already has lib-shm0 in 1.13-2~ubuntu18.04 version using dpkg -l to display it.
Also the package download itself knows that it should download the 1.13-1 version but can only find the 1.13-2 version so it fails.
Do I need to get the source and change it to accept the 1.13.2 version and recompile?
That might take me several months to figure out, but a maintainer might take a lot less time.
Thanks bobo23

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
James Robert Gilbert
Last query:
Last reply:

This question was reopened

Manfred Hampl (m-hampl) said : #2

libxcb-shm0* version 1.13-1 is in "bionic"
libxcb-shm0* version 1.13-2~ubuntu18.04 is in "bionic-updates"

You should have both enabled in your list of repositories, and you should make sure that you have all available updates installed.

What is the output of the commands

lsb_release -crid
sudo apt update
apt list --upgradeable

James Robert Gilbert (bobo23) said : #3

to actionparsnip:
Thanks for the quick reply and I learned alot with it.
here is the output:
jim-u2@jimu2-T480s:/home$ apt-cache policy libxcb-shm0-dev libxcb-shm0
  Installed: (none)
  Candidate: 1.13-1
  Version table:
     1.13-1 500
        500 bionic/main amd64 Packages
  Installed: 1.13-2~ubuntu18.04
  Candidate: 1.13-2~ubuntu18.04
  Version table:
 *** 1.13-2~ubuntu18.04 100
        100 /var/lib/dpkg/status
     1.13-1 500
        500 bionic/main amd64 Packages

The second reply about "bionic-updates" below opened tnaother door for me
see that reply below.
to Manfred:
Thanks for the "bionic-updates" clue. I did some on-line reading and pokeing around
and found the Software & Updates page on the desktop which led to the "updates" tab,
where I saw the blank [] Recommended updates(bionic-updates) unchecked! OOPS!
I checked the box and closed the page then I checked the file in:

$ gedit /etc/apt/sources.list

which had the non-check-marked line:

deb bionic-updates multiverse main universe restricted

then I did the:

$ sudo apt update

Which promptly dumped quite a few files into my system from the "bionic-updates" ppa.
Then I did:

$ sudo apt install libxcb-shm0-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 93 not upgraded.
Need to get 6,684 B of archives.
After this operation, 50.2 kB of additional disk space will be used.
Get:1 bionic-updates/main amd64 libxcb-shm0-dev amd64 1.13-2~ubuntu18.04 [6,684 B]
Fetched 6,684 B in 2s (3,588 B/s)
Selecting previously unselected package libxcb-shm0-dev:amd64.
(Reading database ... 224214 files and directories currently installed.)
Preparing to unpack .../libxcb-shm0-dev_1.13-2~ubuntu18.04_amd64.deb ...
Unpacking libxcb-shm0-dev:amd64 (1.13-2~ubuntu18.04) ...
Setting up libxcb-shm0-dev:amd64 (1.13-2~ubuntu18.04) ...

which did load the library. I checked this out with:

$ dpkg -l libxcb-shm0-dev
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
ii libxcb-shm0-dev:amd64 1.13-2~ubuntu18.04 amd64 X C Binding, shm extension, development files

which shows it loaded. Thank you very much!! bobo23