Problem installing mozjpeg

Hello. Currently trying to install mozjpeg, but no success. Tried 2 different methods:

  1. pacman -S mozjpeg
    error: target not found: mozjpeg
  2. yay -S mozjpeg. Starts just fine, but eventually get this error:
    :: mozjpeg and libjpeg-turbo are in conflict (libjpeg). Remove libjpeg-turbo? [y/N] y
    error: failed to prepare transaction (could not satisfy dependencies)
    :: removing libjpeg-turbo breaks dependency ‘libjpeg-turbo=2.0.6’ required by lib32-libjpeg-turbo

Looks like it’s supposed to replace libjpeg-turbo and there are quite a few applications that rely on libjpeg-turbo. Is it possible to somehow finish this installation? Want to use mozjpeg for images minification

Sounds like you need to install lib32-mozjpeg replacing lib32-libjpeg-turbo, before installing mozjpeg replacing libjpeg-turbo.

I tried doing sudo pacman -S lib32-mozjpeg and got:

error: target not found: lib32-mozjpeg

Then I tried yay -S lib32-mozjpeg
Here are few important items that came as result:

:: Checking for inner conflicts...
 -> 
Package conflicts found:
 -> Installing lib32-mozjpeg will remove: lib32-libjpeg-turbo (lib32-libjpeg), lib32-libjpeg-turbo
 -> Installing mozjpeg will remove: libjpeg-turbo (libjpeg), libjpeg-turbo
 -> Conflicting packages will have to be confirmed manually
[Repo Make:1]  nasm-2.15.05-1
[Aur:2]  mozjpeg-4.0.0-3  lib32-mozjpeg-4.0.0-1
 -> mozjpeg not satisfied, flushing install queue
loading packages...
resolving dependencies...
looking for conflicting packages...
:: mozjpeg and libjpeg-turbo are in conflict (libjpeg). Remove libjpeg-turbo? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: removing libjpeg-turbo breaks dependency 'libjpeg-turbo=2.0.6' required by lib32-libjpeg-turbo
checking dependencies...

Packages (1) nasm-2.15.05-1

Total Removed Size:  3.15 MiB

Looks like it didn’t manage to install mozjpeg. Any thoughts are appreciated :slight_smile:

Just to be sure, do you have anything that depends on lib32-libjpeg-turbo?
pacman -Qi lib32-libjpeg-turbo. Looks for a “Required By:” line.

Result of following command: sudo pacman -Qi lib32-libjpeg-turbo | grep Required:

Required By     : lib32-gdk-pixbuf2  lib32-libtiff

Is there any other useful information I could provide? :slight_smile: Seems like this would be common thing - to try to install mozjpeg

mozjpeg is an AUR package, so no, it’s not a common thing.

Is there a reason why you need mozjpeg instead of the regular libjpeg-turbo package?

I want to minimize jpeg file sizes. When I am doing cjpeg -v -quality 80 cached_images/7869509e564afea7e2db9a9de7388939b0446230.jpg with libjpeg-turbo, I just get Unrecognized input file format --- perhaps you need -targa

You need to build both packages and install them at the same time, not one by one

Could you please clarify which packages and what command should I use to install them?