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

See original GitHub issue

Hello, I just installed vips from source on my system and here are the relevant outputs after the install:

$ ldconfig -p | grep vips
	libvips.so.42 (libc6,x86-64) => /usr/local/lib/libvips.so.42
	libvips.so (libc6,x86-64) => /usr/local/lib/libvips.so
	libvips-cpp.so.42 (libc6,x86-64) => /usr/local/lib/libvips-cpp.so.42
	libvips-cpp.so (libc6,x86-64) => /usr/local/lib/libvips-cpp.so

$ echo $LD_LIBRARY_PATH 
$LD_LIBRARY_PATH:/usr/local/lib/

$ echo $C_INCLUDE_PATH 
$C_INCLUDE_PATH:/usr/local/include/

$ echo $CPLUS_INCLUDE_PATH 
$CPLUS_INCLUDE_PATH:/usr/local/include/

$ ls /usr/local/include/
blosc-export.h  blosc.h  jconfig.h  jerror.h  jmorecfg.h  jpeglib.h  openjpeg-2.3  openslide  vips  zconf.h  zlib.h

But after installing pyvips with:

pip install -U git+https://github.com/libvips/pyvips.git

And doing:

import pyvips

I get this error:

>>> import pyvips
Traceback (most recent call last):
  File "/home/ekami/Programs/anaconda3/envs/dl/lib/python3.7/site-packages/pyvips/__init__.py", line 19, in <module>
    import _libvips
ModuleNotFoundError: No module named '_libvips'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ekami/Programs/anaconda3/envs/dl/lib/python3.7/site-packages/pyvips/__init__.py", line 70, in <module>
    vips_lib = ffi.dlopen(_vips_libname)
  File "/home/ekami/Programs/anaconda3/envs/dl/lib/python3.7/site-packages/cffi/api.py", line 146, in dlopen
    lib, function_cache = _make_ffi_library(self, name, flags)
  File "/home/ekami/Programs/anaconda3/envs/dl/lib/python3.7/site-packages/cffi/api.py", line 828, in _make_ffi_library
    backendlib = _load_backend_lib(backend, libname, flags)
  File "/home/ekami/Programs/anaconda3/envs/dl/lib/python3.7/site-packages/cffi/api.py", line 823, in _load_backend_lib
    raise OSError(msg)
OSError: cannot load library 'libvips.so.42': /usr/lib/librsvg-2.so.2: undefined symbol: cairo_tag_end.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'libvips.so.42'

I’m on Manjaro (Arch linux) and my conda env is using Python 3.7.2. Any idea how I can solve this? Thank you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
NeelKanwalcommented, Jan 20, 2021

There is actually a cleaner solution to the ugly one I found. Just use:

conda install -c conda-forge librsvg
conda install -c conda-forge libiconv 

And you’re done 😃

It does not work for me

1reaction
jcupittcommented, Mar 12, 2019

Yes that’s a classic conda / non-conda problem 😦 It’s very unfortunate that there are at least four versions of libjpeg in common use, and you (often) can’t mix them in one executable.

Wait until you try to load something via libMagick.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
OSError: cannot load library libvips.so.42 when initiating Remo
I get an error when I run python -m remo_app init : OSError: cannot load library 'libvips.so.42': /lib/x86_64-linux-gnu/librsvg-2.so.2: ...
Read more >
README — pyvips 2.2.1 documentation
You can find out how pyvips installed with pip show pyvips . ... The conda package includes a matching libvips binary, so just...
Read more >
Libvips-cpp.so.42 not found on AppImage upgrade from 0.9.1 ...
Starting from the command line, I see the following… ... installing the "sharp" module libvips-cpp.so.42: cannot open shared object file: No ...
Read more >
libvips
A fast image processing library with low memory needs.
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