0

I've been using Ubuntu for a couple months now but just recently the command sudo apt upgrade has stopped working. I get the error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  libjpeg-turbo8 libjpeg-turbo8:i386
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  libjpeg8 libjpeg8:i386
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/272 kB of archives.
After this operation, 524 kB of additional disk space will be used.
(Reading database ... 273198 files and directories currently installed.)
Preparing to unpack .../libjpeg8_8d-1+deb7u1_i386.deb ...
De-configuring libjpeg8:amd64 (8c-2ubuntu8) ...
Unpacking libjpeg8:i386 (8d-1+deb7u1) over (8c-2ubuntu8) ...
dpkg: error processing archive /var/cache/apt/archives/libjpeg8_8d-1+deb7u1_i386.deb (--unpack):
 trying to overwrite '/usr/lib/i386-linux-gnu/libjpeg.so.8', which is also in package libjpeg-turbo8:i386 1.4.2-0ubuntu3
Preparing to unpack .../libjpeg8_8d-1+deb7u1_amd64.deb ...
De-configuring libjpeg8:i386 (8c-2ubuntu8) ...
Unpacking libjpeg8:amd64 (8d-1+deb7u1) over (8c-2ubuntu8) ...
dpkg: error processing archive /var/cache/apt/archives/libjpeg8_8d-1+deb7u1_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libjpeg.so.8', which is also in package libjpeg-turbo8:amd64 1.4.2-0ubuntu3
Errors were encountered while processing:
 /var/cache/apt/archives/libjpeg8_8d-1+deb7u1_i386.deb
 /var/cache/apt/archives/libjpeg8_8d-1+deb7u1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

If you need any clarification on my problem please be specific. And also please dumb down all answers.

Thanks in advance

2
  • There should be at least one other error message above the line you copied. Please include the entire output of sudo apt upgrade.
    – user89623
    Feb 25, 2018 at 2:46
  • Thanks for your response. it's too long to put in a comment so I posted it here: docs.google.com/document/d/…
    – Boio
    Feb 25, 2018 at 2:51

1 Answer 1

1

Often these types of problems can be caused by non-standard sources, but here it looks like a package trying to be upgraded is conflicting with a file from the "no longer required" old libjpeg-turbo8 package.

These lines are the clue:

dpkg: error ... trying to overwrite '/usr/lib/i386-linux-gnu/libjpeg.so.8', which is also in package libjpeg-turbo8:i386 1.4.2-0ubuntu3

An easy fix should be to do what the earlier message says:

The following packages were automatically installed and are no longer required:

libjpeg-turbo8 libjpeg-turbo8:i386

Use 'sudo apt autoremove' to remove them.

So first Use 'sudo apt autoremove' to remove them, and then try again.

11
  • Hi. Thanks for your response. However, I have already tried this and it hasn't worked. Just to double check I tried again but the same result. Are there any specific packages I need to delete by any chance?
    – Boio
    Feb 25, 2018 at 3:37
  • You definitely shouldn't be getting the same errors if the libjpeg-turbo8 libjpeg-turbo8:i386 packages have been removed... Are there still any files named /usr/lib/i386-linux-gnu/libjpeg.so.8 or it's x86-64 brother? Because they should have been removed as well
    – Xen2050
    Feb 25, 2018 at 3:40
  • those files aren't there, however yes i still get the sam error
    – Boio
    Feb 25, 2018 at 3:49
  • when i tried manually removig them with apt remove, i got this error: docs.google.com/document/d/…
    – Boio
    Feb 25, 2018 at 3:53
  • That's weird, if the files are gone there shouldn't be any problem writing new files... if the old packages weren't really removed (or purged even) then maybe dpkg still thinks the files are there, but I'm not positive on that. Have you tried apt remove libjpeg-turbo8 (without the extra :i386 and version) first, and what does it say? PS your google docs seems to only say "docs.google.com/document/d/…", but you can edit the info into your Q too
    – Xen2050
    Feb 25, 2018 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.