to fix it I deleted some of the initrd.img-4.4.0-64-generic files, leaving the ones leading up to the linux image I'm actually using, to do this I had to navigate to boot in the terminal then sudo thuner (this was the bit thata was hard to work out because xubuntu renames thunar file manager) I was then able to run the -f install command and everything seems to be back to normal now. Thanks to everyone who tried to help, communities like these and the collections of knowledge and experience they house are so important.

I'm trying to install libraw-dev in order to use rawpy in Python, here's what I get:

$ sudo apt-get install libraw-dev
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.
 libraw-dev : Depends: liblcms2-dev but it is not going to be installed
 linux-image-extra-4.4.0-66-generic : Depends: linux-image-4.4.0-66-generic but it is not going to be installed
 linux-image-extra-4.4.0-79-generic : Depends: linux-image-4.4.0-79-generic but it is not going to be installed
 linux-image-generic : Depends: linux-image-4.4.0-79-generic but it is not going to be installed
 linux-signed-image-4.4.0-66-generic : Depends: linux-image-4.4.0-66-generic (= 4.4.0-66.87) but it is not going to be installed
 linux-signed-image-4.4.0-79-generic : Depends: linux-image-4.4.0-79-generic (= 4.4.0-79.100) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

apt-get -f install gives me:

Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Running autoremove brings up the same error as trying to add a package, I tried using the software updater tool to update the linux-image I think I read somewhere that that might help but theirs not enough space in /boot, and when I try to clear out the old images using this I get the dependency error again. I've tried removing another program using apt just to test it and again got the dependency error. I was playing around with conda environments making and removing some before is it possible this could have caused it?

I'm using xubuntu, I get 4.4.0-64-generic when I put uname -r into the terminal, thanks for taking the time to read this.

edit:after updating(apologies for the formatting of the outputs, does anyone know why it wont let me do more than one more line as code?):

AppStream cache update completed, but some metadata was ignored due to errors.

after -f install the last part of the output is again (I'd put the whole output but it won’t display it as code and the forum thinks I’m trying to post too many links):

Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

and finally redoing the install as before still gives me the dependency error as before.

  • 1
    I'm not sure if this will help, but could you please try running sudo apt-get update, followed by sudo apt-get -f install and then run your original command again, and tell us what happens. Jun 14, 2017 at 16:19
  • I've tried what you said, it doesnt seem to have helped unfortunately, thanks anyway though Jun 14, 2017 at 17:20
  • Are you still getting the exact same error, or has it changed at all? Jun 14, 2017 at 17:46
  • itss exactly the same Jun 14, 2017 at 18:46
  • Read the error messages carefully - the packages do not depend upon themselves. Look for the '-extra' and '-signed' strings to see the difference. Clean out those old kernels if you are not using them.
    – user535733
    Jun 14, 2017 at 20:17

1 Answer 1


Nick Weinberg's suggestion in the comments fixed the issue for me on Ubuntu 16.04 LTS - 64bit:

sudo apt-get update
sudo apt-get -f install
  • where you getting the same error with the images being dependent on themselves? Jun 14, 2017 at 18:58
  • confuser already said in the comments that the solution didn't work for them Jun 14, 2017 at 19:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .