Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpng not recognized #110

Closed
YutMarma opened this issue Apr 11, 2024 · 12 comments
Closed

libpng not recognized #110

YutMarma opened this issue Apr 11, 2024 · 12 comments

Comments

@YutMarma
Copy link

Hello! First off, thank you for taking the time to create imei. It's sort of unfathomably ridiculous that debian/Ubuntu still, nearly ten years later, refuses to allow for an easy aptitude-based method of installing something as important as imagemagick 7.0, but I guess that's why Microsoft feels safe making Windows 11 the ultimate user-experience downgrade.

I'll spare the full rant and cut to the heart of what's going on. I installed imei:

Installing dependencies       [OK]
 Building aom                  [SKIPPED (CMAKE version not sufficient)]
 Building libheif              [SKIPPED (aom is required but not installed)]
 Building jpegxl               [SKIPPED (CMAKE version not sufficient)]
 Building ImageMagick (Q16)    [OK]
 Verifying installation        [OK]
$ magick --version
Version: ImageMagick 7.1.1-30 Q16-HDRI x86_64 babe7ad2f:20240407 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(4.5)
Delegates (built-in): ltdl zlib
Compiler: gcc (13.2)

And have installed libpng-dev:

$ sudo apt install build-essential libpng-dev pkg-config
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.10ubuntu1).
libpng-dev is already the newest version (1.6.40-1).
pkg-config is already the newest version (1.8.1-2).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

The 2 not upgraded are unrelated nonsense:

$ apt list --upgradable
Listing... Done
libchromaprint1/oldstable 1:1.5.0-dmo1 amd64 [upgradable from: 1.5.1-4build1]
php-common/mantic 2:93ubuntu1 all [upgradable from: 2:92ubuntu1]

However:

$ magick image.png -trim +repage output.png
magick: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/746.

Any suggestions?

@SoftCreatR
Copy link
Owner

Please attach the log file. It should tell us, why it didn't install properly.

@YutMarma
Copy link
Author

Tons of relinking warnings here:

imei-1712797211.log

@SoftCreatR
Copy link
Owner

SoftCreatR commented Apr 11, 2024

The main problem seems to be this:

The following packages have unmet dependencies:
 libavcodec58 : Depends: libcodec2-0.9 (>= 0.9.2) but it is not installable
                Depends: libwebp6 (>= 0.5.1) but it is not installable
 libavfilter7 : Depends: libtesseract4 but it is not installable
 libavformat58 : Depends: libsrt1.4-gnutls (>= 1.4.2) but it is not installable
                 Depends: libssl1.1 (>= 1.1.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

@YutMarma
Copy link
Author

So is this something that I'm going to be able to resolve? This is a relatively bog-standard Ubuntu LTS 22 install, running under WSL on Windows.

Tangentially-related, what's the approved procedure for an uninstall? (didn't see anything in the README.md)

If Windows Batch wasn't a slightly less-elegant, slightly more-psychotic version of INTERCAL I'd have given up with this IM7-on-Linux pipe dream weeks ago. :)

@SoftCreatR
Copy link
Owner

SoftCreatR commented May 1, 2024

Do you have any extra PPA's enabled (e.g. ppa:ondrej/php)?

@YutMarma
Copy link
Author

Do you have any extra PPA's enabled (e.g. ppa:ondrej/php)?

Not to my knowledge. There may or may not be a partial, non-apt install of Imagemagick lingering around from earlier in the rabbit hole, but if there is, I lack the Linux fluency to know how to manually hunt it down and snuff it out. I mean, rm, duh, but as far as what exactly to ls -R for, I'm in the dark.

@SoftCreatR
Copy link
Owner

The problem isn't imagemagick. You should make sure, that there's no other apt source defined, except for the basic ones.

@YutMarma
Copy link
Author

I doubt that there is, but what exactly would I do to verify there isn't? I'm not computer-dumb, just Linux-dumb :)

@SoftCreatR
Copy link
Owner

Check /etc/apt/sources.list.d/.

@YutMarma
Copy link
Author

I have one there, for recoll:

recoll-backports-ubuntu-recoll-1_15-on-mantic.sources

Types: deb
URIs: https://ppa.launchpadcontent.net/recoll-backports/recoll-1.15-on/ubuntu/
Suites: mantic
Components: main
Signed-By: [snipped PGP key]

I assume next step is to delete it and try again?

@SoftCreatR
Copy link
Owner

That's not the issue. First of all: Is there a reason, that you are using Ubuntu 23.10, instead of 24.04 LTS? What I can tell is, that something strange is going on with your system. Ubuntu 23.10 has CMAKE 3.27.4, but IMEI complains, that the installed CMAKE version isn't sufficient.

What's the result of

cmake --version | head -n1 | cut -d" " -f3

? I just set-up a fresh Ubuntu 22.04 server, upgraded to 23.10, and performed the installation of IMEI without any problems:

image

@YutMarma
Copy link
Author

First of all: Is there a reason, that you are using Ubuntu 23.10, instead of 24.04 LTS?

Linux is my secondary OS (as you can probably already tell from how much hand-holding I've needed). I use it via WSL (Windows Subsystem Linux) for command line-intensive operations, since Windows batch scripting is such an irredeemable puddle of horror. I basically take a philosophy that "if apt update doesn't do it, it doesn't need to be done right now". I'd be happy to update if you think it's worth a shot.

What's the result of (snip)

Well, I think we found our issue - cmake wasn't actually installed. Maybe it's not part of the default WSL Ubuntu distribution.

I went ahead and installed it, then re-installed imei.sh and everything seems great now!

$ magick image.png -trim +repage output.png
[the blissful lack of follow-up indicating success goes here]

Thank you so, so much for your time with this. I knew it'd probably be something unbelievably goofy like this, but I never would have been able to track it down myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants