2

Having an issue updating Ubuntu 18.04 install

sudo apt update

works fine, then

sudo apt upgrade

fails with

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
 libgdk-pixbuf2.0-0 : Depends: libglib2.0-0 (= 6= 2.48.0) but 2.56.3-0ubuntu0.18.04.1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

then running:

sudo apt --fix-broken install

gives

The following additional packages will be installed:
  libgdk-pixbuf2.0-0
The following packages will be upgraded:
  libgdk-pixbuf2.0-0

followed by:

dpkg: warning: parsing file '/var/lib/dpkg/status' near line 14881 package 'libgdk-pixbuf2.0-0:amd64':
 'Depends' field, reference to 'libglib2.0-0':
 implicit exact match on version number, suggest using '=' instead
dpkg: error: parsing file '/var/lib/dpkg/status' near line 14881 package 'libgdk-pixbuf2.0-0:amd64':
 'Depends' field, reference to 'libglib2.0-0': version contains ' '
E: Sub-process /usr/bin/dpkg returned an error code (2)

edit:

$ apt-cache policy libgdk-pixbuf2.0-0:amd64 libglib2.0-0
libgdk-pixbuf2.0-0:
  Installed: 2.36.11-2
  Candidate: 2.36.11-2
  Version table:
     2.36.11-2 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
 *** 2.36.11-2 100
        100 /var/lib/dpkg/status
libglib2.0-0:
  Installed: 2.56.3-0ubuntu0.18.04.1
  Candidate: 2.56.3-0ubuntu0.18.04.1
  Version table:
 *** 2.56.3-0ubuntu0.18.04.1 100
        100 /var/lib/dpkg/status
     2.56.1-2ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages

edit2: after re-enabling the package sources

$ sudo apt update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://gb.archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://gb.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]   
Fetched 177 kB in 0s (384 kB/s)                                                
Reading package lists... Done
Building dependency tree       
Reading state information... Done
122 packages can be upgraded. Run 'apt list --upgradable' to see them.

then

$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies.
 libgdk-pixbuf2.0-0 : Depends: libglib2.0-0 (= 6= 2.48.0) but 2.56.3-0ubuntu0.18.04.1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

$ apt-cache policy libgdk-pixbuf2.0-0:amd64 libglib2.0-0
libgdk-pixbuf2.0-0:
  Installed: 2.36.11-2
  Candidate: 2.36.11-2
  Version table:
     2.36.11-2 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
 *** 2.36.11-2 100
        100 /var/lib/dpkg/status
libglib2.0-0:
  Installed: 2.56.3-0ubuntu0.18.04.1
  Candidate: 2.56.3-0ubuntu0.18.04.1
  Version table:
 *** 2.56.3-0ubuntu0.18.04.1 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.56.2-0ubuntu0.18.04.2 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     2.56.1-2ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
N0rbert
  • 99,918
pete
  • 23
  • 4
  • 1
    Please add output of apt-cache policy libgdk-pixbuf2.0-0:amd64 libglib2.0-0 to the question. – N0rbert Jan 28 '19 at 08:42
  • 1
    For me it seems that you have not enabled bionic-security and bionic-updates pockets of repositories. Please enable them and retry with sudo apt update, sudo apt full-upgrade. – N0rbert Jan 28 '19 at 08:51
  • Try my updated answer. – N0rbert Jan 28 '19 at 09:02
  • Thanks - I get the same error as before: "dpkg: error: parsing file '/var/lib/dpkg/status' near line 14881 package 'libgdk-pixbuf2.0-0:amd64': " - the line in questions reads "Depends: libc6 (>= 2.14), libglib2.0-0 (6= 2.48.0), libjpeg8 (>= 8c), libpng16-16 (>= 1.6.2-1), libtiff5 (>= 4.0.3), libx11-6, shared-mime-info, libgdk-pixbuf2.0-common (= 2.36.11-2)" – pete Jan 28 '19 at 09:09
  • Then install Aptitude with sudo apt-get install aptitude and then run sudo aptitude dist-upgrade to fix the problem. Or run sudo apt-get dist-upgrade. – N0rbert Jan 28 '19 at 09:18
  • 1
    Thanks for your help - I fixed it by editing the /var/lib/dpkg/status file and changing libglib2.0-0(6=2.48.0) to read (=2.48.0) - then did an apt update/upgrade – pete Jan 28 '19 at 09:35

2 Answers2

0

Try to download both problematic packages and then force their installation with:

apt-get download libgdk-pixbuf2.0-0=2.36.11-2 libglib2.0-0=2.56.3-0ubuntu0.18.04.1
sudo dpkg -i --force-all lib*.deb
N0rbert
  • 99,918
  • Thanks still get the error: dpkg: warning: parsing file '/var/lib/dpkg/status' near line 14881 package 'libgdk-pixbuf2.0-0:amd64': 'Depends' field, reference to 'libglib2.0-0': implicit exact match on version number, suggest using '=' instead dpkg: error: parsing file '/var/lib/dpkg/status' near line 14881 package 'libgdk-pixbuf2.0-0:amd64': 'Depends' field, reference to 'libglib2.0-0': version contains ' ' – pete Jan 28 '19 at 08:40
0

I fixed it by editing the /var/lib/dpkg/status file and changing libglib2.0-0(6=2.48.0) to read (=2.48.0) - then did an apt update/upgrade

pete
  • 23
  • 4