Score:1

How to fix libjpeg62/libjpeg8 installation conflict, it is preventing me from install any packages

in flag

I am using Ubuntu 22.04. Somehow, whenever I try to install a package in Ubuntu, I get this error

libjpeg-dev : Depends: libjpeg62-turbo-dev (>= 1:1.5.2-2+deb10u1) but it is not going to be installed

So I tried sudo apt -f install

But I got

dpkg: error processing archive /var/cache/apt/archives/libjpeg62-turbo-dev_1%3a1.5.2-2+deb10u1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/jerror.h', which is also in package libjpeg-turbo8-dev:amd64 2.1.2-0ubuntu1

I tried to remove libjpeg8, but got an error

sudo apt-get remove libjpeg-turbo8-dev

The following packages have unmet dependencies:
 libjpeg-dev : Depends: libjpeg62-turbo-dev (>= 1:1.5.2-2+deb10u1) but it is not going to be installed

I tried to install libjpeg62

sudo apt-get install libjpeg62-turbo-dev

dpkg: error processing archive /var/cache/apt/archives/libjpeg62-turbo-dev_1%3a1.5.2-2+deb10u1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/jerror.h', which is also in package libjpeg-turbo8-dev:amd64 2.1.2-0ubuntu1

I tried to install aptitude because it is said to be able to resolve package conflict, but got the same error

sudo apt-get install aptitude
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 aptitude : Depends: aptitude-common (= 0.8.13-3ubuntu1) but it is not going to be installed
            Depends: libcwidget4 (>= 0.5.18-1) but it is not going to be installed
            Depends: libxapian30 (>= 1.4.17~) but it is not going to be installed
 libjpeg-dev : Depends: libjpeg62-turbo-dev (>= 1:1.5.2-2+deb10u1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Output when I tried to run dpkg --configure

sudo dpkg --configure -a && sudo apt clean
dpkg: dependency problems prevent configuration of libjpeg-dev:
 libjpeg-dev depends on libjpeg62-turbo-dev (>= 1:1.5.2-2+deb10u1); however:
  Package libjpeg62-turbo-dev:amd64 is not installed.

dpkg: error processing package libjpeg-dev (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libjpeg-dev

Basically, in my system now there is a conflict in libjpeg8 and libjpeg62 which can't be fixed. What can I do to resolve this?

guiverc avatar
cn flag
What OS & release are you using? Your pasted details show a *debian old-old-stable* package version and not a Ubuntu package. The Debian *old old stable* release will only ~align with non-LTS releases from EOL Ubuntu products (Debian releases on an *odd* year); you've polluted your system if it **was** Ubuntu.
Mạnh Vũ avatar
in flag
I am using Ubuntu 22.04
Mạnh Vũ avatar
in flag
If I polluted my system, how should I clean it?
guiverc avatar
cn flag
Your detail shows `deb10u1` where Debian 12 is *stable*, 11 being *old-stable* & 10 being *old-old-stable*, ie. you've polluted your system by adding old-old Debian packages which need removal. I'd start by checking your sources (`apt update` or read sources), then look at where/why & who added Debian packages to it. Those need to be removed which maybe quick/difficult depending on how polluted your system is; you can re-install. *I'm not familiar with the packages thus don't know how easy/difficult it will be; I'd thus look at why/when installed & backtrack what was done*
guiverc avatar
cn flag
Package mentioned is `libjpeg62-turbo-dev | 1:1.5.2-2+deb10u1 | oldoldstable | amd64, arm64, armel, armhf, i386, mips, mips64el, mipsel, ppc64el, s390x` which you'll NOTE isn't Ubuntu, but DEBIAN. *My search on Ubuntu resources with it returned blank; only results being Debian from 2019*
Score:0
in flag

The solution was to remove by running

sudo apt-get remove libjpeg-dev

after that, I can do package installation as normal

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.