0

During the distro-upgrade 14.10 in the unpacking I saw an error in the terminal that said do this to fix:

gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache

However I get a permission denied message every time even when I try that using sudo in front. When I run sudo apt-get update I notice

The following packages have been kept back:
  libgbm1 xorg
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.  

How do I get these to upgrade?

muru
  • 197,895
  • 55
  • 485
  • 740

1 Answers1

0

This is, very simply, a mis-use of sudo on your part. The redirection in the command

sudo gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache

is enacted by the shell and happens before the sudo command is executed with superuser permissions. So the shell tells you that permission is denied when attempting to overwrite the contents of /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache because it is to you, the unprivileged user doing redirection in xyr unprivileged shell.

The correct ways to enact the fix that the message is giving are:

  • To do this in a superuser shell.
  • To quote the redirection and pass it to a secondary, privileged process, shell:

    sudo sh -c 'gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache'
    

For what it's worth, the underlying cause of this problem is reportedly an error in the "maintainer scripts" for the gdk-pixbuf package that causes it to delete the cache file partway through the upgrade process. This error has persisted through several Ubuntu versions.

Further reading

JdeBP
  • 3,959