opencv problem:
./test1: error while loading shared libraries: libopencv_highgui.so.3.4: cannot open shared object file: No such file or directory
This is the problem I have when executing test1
this file
error while loading shared libraries: indicates that there is a problem with the shared library.
Two methods are described below.
the first method
Check the dynamic library (shared library) configuration file
sudo gedit /etc/ld.so.conf
Make sure you have the first line of the path
and then update it
sudo ldconfig
The second method
Let’s first look at the shared library of this file that is executed
ldd test1
We can see that there are several libraries that cannot be found
Then we use the locate
command to locate these libraries
Install the locate command
sudo apt install mlocate
Locate the missing libraries in turn
locate libopencv_highgui.so.3.4
The path is found, then we add the path
Go to the dynamic library configuration folder
cd /etc/ld.so.conf.d
Create a new .conf file, name it whatever you want
You can also add it to the original file without creating a new one.
I create a new opencv.conf file here
sudo vim opencv.conf
It seems that there is no need to add so many paths here
Once the file is saved, it’s time to update the shared library link
sudo ldconfig
After the update, you can delete the newly created .conf file without affecting it.
Read More:
- ./popins2: error while loading shared libraries: libbifrost.so: cannot open shared object file: No such file or directory
- error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
- [Solved] ./my_cmake_exe: error while loading shared libraries: libswresample.so.4: cannot open shared object file: No such file or directory
- [Solved] curl error while loading shared libraries libcrypto.so.1.0.0
- [Solved] import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- ffmpeg:error while loading shared libraries: libopenh264.so.5
- [619]libgtk-3.so.0 or libXt.so.6: cannot open shared object file: No such file or directory
- [Samtools] Run error: error while loading shared libraries: libcrypto.so.1.0.0 or libncurses.so.5 or libtinfow.so.5
- DM Install Error: error while loading shared libraries: libdmnsort.so:
- [Solved] import mxnet Error: OSError: libcudart.so.8.0: cannot open shared object file: No such file or directory
- [Solved] mongodb Install Error: mongod: error while loading shared libraries
- [Solved] java.lang.UnsatisfiedLinkError: dlopen failed: /lib/arm64/libc++_shared.so not found
- [Solved] kettle Error: Unexpected problem reading shared objects from XML file: null
- jenkins pipeline Shared Library Error: No signature of method
- [Solved] PCL Install error: ‘shared_ptr’ does not name a type
- [Solved] Installation failed due to: ‘INSTALL_FAILED_SHARED_USER_INCOMPATIBLE: Package com.
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] Cmake compile opencv open-source project Error: but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be…
- [Solved] Jmeter Error: Error loading results file – see file log
- [Solved] ERROR: Could not open requirements file: [Errno 2] No such file or directory : ‘requirments.txt‘