Debian 12 – Fix libjpeg8 missing dependency error for Parsec

While trying to install Parsec application in Debian 12, I came across the following error:

root@x220:~# dpkg -i /home/panos/Downloads/parsec-linux.deb
(Reading database … 347864 files and directories currently installed.)
Preparing to unpack …/Downloads/parsec-linux.deb …
Unpacking parsec (150-91a) over (150-91a) …
dpkg: dependency problems prevent configuration of parsec:
parsec depends on libjpeg8; however:
Package libjpeg8 is not installed.

dpkg: error processing package parsec (--install):
dependency problems - leaving unconfigured
Processing triggers for mate-menus (1.26.0-3) …
Processing triggers for mailcap (3.70+nmu1) …
Processing triggers for desktop-file-utils (0.26-1) …
Processing triggers for hicolor-icon-theme (0.17-2) …
Errors were encountered while processing:
parsec
root@x220:~#

If we try to run parsecd, we will get the following error:

Parsec libjpeg error

This is a result of Debian having removed libjpeg8 from it’s APT package database. Instead, we have to install and use the available package, libjpeg62-turbo, if not already installed. Afterwards, we just create a symbolic link to the filename we need in order for Parsec to be happy and run as usual.

root@x220:~# ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so.62 /usr/lib/x86_64-linux-gnu/libjpeg.so.8

After that, we try to run Parsec again:

Parsec now running without complaining

Parsec does not complain anymore and runs as expected. There’s one caveat with this quick fix, though.

APT will see the unresolved libjpeg8 dependency and will keep nagging us about it while running it.

root@x220:~# apt upgrade
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:
parsec : Depends: libjpeg8 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@x220:~#

For me, that’s a compromise I’d be willing to accept for the time being, in order to run it for some tasks on a Windows 10 VM.

You can always choose to run Parsec through Flatpak[1] or AppImage[2]. I should look into containerizing Parsec and running it through Docker, which is becoming my favorite choice for running various pieces of software, as it avoids all the clutter and potential dependency issues, exactly like the one we’re dealing with here.

Of course, the easy solution would be to just install libjpeg8 .deb package directly and skip all the symlink stuff, like this:

root@x220:~# wget https://archive.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8b-1_amd64.deb
--2024-02-29 14:40:45-- https://archive.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8b-1_amd64.deb
Resolving archive.debian.org (archive.debian.org)… 151.101.194.132, 151.101.130.132, 151.101.2.132, …
Connecting to archive.debian.org (archive.debian.org)|151.101.194.132|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 133524 (130K) [application/vnd.debian.binary-package]
Saving to: ‘libjpeg8_8b-1_amd64.deb’

libjpeg8_8b-1_amd64.deb 100%[================================================================>] 130.39K --.-KB/s in 0.1s

2024-02-29 14:40:45 (925 KB/s) - ‘libjpeg8_8b-1_amd64.deb’ saved [133524/133524]

root@x220:~# dpkg -i libjpeg8_8b-1_amd64.deb
(Reading database … 347871 files and directories currently installed.)
Preparing to unpack libjpeg8_8b-1_amd64.deb …
Unpacking libjpeg8 (8b-1) over (8b-1) …
Setting up libjpeg8 (8b-1) …
root@x220:~#

If the second fix does not show any side effects, it will be the most elegant and less hacky solution, plus it removes the APT warnings every time we have to run APT.

[1]: https://flathub.org/apps/com.parsecgaming.parsec
[2]: https://appimage.github.io/parsec-linux-appimage/

Sources:
https://unix.stackexchange.com/questions/687633/why-is-libjpeg-so-8-missing-from-debian

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.