question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot locate libvips.so.42, now on Red Hat Linux 9 (or RHEL 9)

See original GitHub issue

I’m using the following set of instructions to install all the dependencies for Red Hat Linux 9 (or RHEL 9):

-------------------------------------- Install PyVips ----------------------------------------
$ su root
# dnf install python-requests
# dnf install python-pip
# dnf install python-wheel
# subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms
# exit

$ pip install pyvips

----------------------------------------- Install LibVips -------------------------------------
$ su root

# subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
# dnf upgrade
# dnf install snapd
# systemctl enable --now snapd.socket
# ln -s /var/lib/snapd/snap /snap

logout/reboot RHEL9

$ su root
# snap wait system seed.loaded
# snap install libvips

--------------------------------- Run the wind.py app -------------------------------
Go to the app folder first, then

$ python wind.py

My Python app runs perfectly under Windows: https://github.com/nakigoe/sea/tree/main/graph_wind_create But under RHEL 9 (Red Hat Linux 9) an infamous error pops up: Cannot locate libvips.so.42

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
kleisaukecommented, Oct 22, 2022

Here are some instructions to install libvips on RHEL 9 (and its derivatives) via Remi’s RPM repository.

# Install the EPEL repository configuration package
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

# Enable the CodeReady Builder repository since EPEL packages may depend on packages from it
crb enable
# or:
# subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms

# Install the Remi repository configuration package
dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm

# Enable Remi's RPM repository
dnf config-manager --set-enabled remi

# Install libvips (+ development files and command-line tools)
dnf install vips vips-devel vips-tools
Optional modules
## Install optional modules
## See: https://github.com/remicollet/remirepo/issues/171

# HEIC / AVIF support via libheif
dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
dnf install vips-heif

# JPEG-XL support via libjxl
dnf install vips-jxl

# *Magick support via GraphicsMagick
dnf install vips-magick-gm

# *Magick support via ImageMagick 6
dnf install vips-magick-im6

# *Magick support via ImageMagick 7
dnf install vips-magick-im7

# OpenSlide support
dnf install vips-openslide

# PDF load support via Poppler
dnf install vips-poppler

See https://github.com/libvips/libvips/issues/1184#issuecomment-447973135 for reasons why libvips isn’t included in EPEL. Personally, I would use AlmaLinux or Rocky Linux because I don’t like subscription-managed distributions.

2reactions
nakigoecommented, Oct 27, 2022

• Removing pyvips both from the normal user $ pip uninstall pyvips and the root user # pip uninstall pyvips • manually clearing the pip cache by finding it with pip cache dir • installing pyvips from the usual user $ pip install pyvips solved the issue. The output of $ python test.py k2.jpg:

DEBUG:pyvips:Loaded binary module _libvips
DEBUG:pyvips:Module generated for libvips 8.13
DEBUG:pyvips:Linked to libvips 8.13
DEBUG:pyvips:Inited libvips
test Image
DEBUG:pyvips.voperation:VipsOperation.call: operation_name = VipsForeignLoadJpegFile
DEBUG:pyvips.voperation:VipsOperation.call: match_image = None
DEBUG:pyvips.vobject:VipsObject.set: name = filename, value = k2.jpg
DEBUG:pyvips.vobject:VipsObject.get: name = out
DEBUG:pyvips.vobject:VipsObject.get: name = interpretation
DEBUG:pyvips.vobject:VipsObject.get: name = width
DEBUG:pyvips.vobject:VipsObject.get: name = height
DEBUG:pyvips.vobject:VipsObject.get: name = format
DEBUG:pyvips.vobject:VipsObject.get: name = bands
DEBUG:pyvips.vobject:VipsObject.get: name = interpretation
DEBUG:pyvips.voperation:VipsOperation.call: result = <pyvips.Image 3008x2000 uchar, 3 bands, srgb>
DEBUG:pyvips.vobject:VipsObject.get: name = interpretation
DEBUG:pyvips.vobject:VipsObject.get: name = width
DEBUG:pyvips.vobject:VipsObject.get: name = height
DEBUG:pyvips.vobject:VipsObject.get: name = format
DEBUG:pyvips.vobject:VipsObject.get: name = bands
DEBUG:pyvips.vobject:VipsObject.get: name = interpretation
image = <pyvips.Image 3008x2000 uchar, 3 bands, srgb>
DEBUG:pyvips.vobject:VipsObject.get: name = width
image.width = 3008

A huge thank you to @jcupitt and @kleisauke for the fast-paced help and patience!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · libvips/pyvips - GitHub
Contribute to libvips/pyvips development by creating an account on GitHub. ... Cannot locate libvips.so.42, now on Red Hat Linux 9 (or RHEL 9)....
Read more >
Chapter 8. Known issues Red Hat Enterprise Linux 9
When booting the RHEL installation from a USB that is created using a third party tool, the installer fails to detect the Local...
Read more >
Red Hat Enterprise Linux (RHEL) 9 - unixsysadmin.com
Comprehensive collection of bookmarks, resources, how-to's and repositories for installing and managing RHEL 9, released on 17 May 2022.
Read more >
Could not open library 'libvips.42.dylib' - Stack Overflow
When upgrading from rails 6 to rails 7, and running some ActiveStorage methods locally, I see: Could ...
Read more >
Cisco UCS Integrated Infrastructure with Red Hat Enterprise ...
Red Hat Enterprise Linux OpenStack Platform 7 on Cisco UCS helps IT ... 9. nova-compute sends the rpc.call request to nova-conductor to fetch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found