Skip to content

fix: install libvips to /opt so libs resolve at runtime - #6

Merged
skunxicat merged 1 commit into
mainfrom
fix/vipsthumbnail-libpath
Aug 15, 2026
Merged

skunxicat merged 1 commit into
mainfrom
fix/vipsthumbnail-libpath

Conversation

@skunxicat

Copy link
Copy Markdown
Member

Fixes the libvips.so.42: cannot open shared object file error in CI.

Root cause

The Dockerfile installed libvips to /usr/local (which on AL2023 puts libs in /usr/local/lib64), then tried to ldd + copy them to /opt/lib. But ldd couldn't resolve libvips.so.42 because /usr/local/lib64 wasn't in the dynamic linker cache at that point.

Fix

  • Build with --prefix=/opt --libdir=/opt/lib so libvips.so.42 is installed directly where the runtime expects it
  • Run ldconfig with /opt/lib registered before collecting system deps
  • Only copy system libraries (glib2, libjpeg, etc.) that aren't already in /opt/lib

The previous Dockerfile installed to /usr/local, then tried to copy
libvips.so.42 to /opt/lib. But ldd couldn't resolve it because
/usr/local/lib64 (where AL2023 places it) wasn't in the linker cache.

Fix: use --prefix=/opt --libdir=/opt/lib so libvips installs directly
where the runtime wrapper expects it. Register /opt/lib with ldconfig
before collecting system deps so ldd resolves all transitive libraries.
@skunxicat
skunxicat merged commit 6a710c2 into main Aug 15, 2026
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant