001. Question
root@ubuntu01:/home/software/PopIns2/PopIns2# ./ popins2 . / popins2 : error while loading shared libraries: libbifrost.so: cannot open shared object file: No such file or directory
002, the cause of the problem
Analysis of the reason: ld prompts that the library file cannot be found, and the library file is in the current directory.
The default directories of the linker ld are /lib and /usr/lib. If they are placed in other paths, you need to let ld know where the library files are.
003. Find the file
root@ubuntu01:/home/software/PopIns2/PopIns2# find / -name " libbifrost.so " /usr/local/lib/ libbifrost.so /home/software/bifrost/build/src/ libbifrost.so find: ' / run /user/ 1000 / doc': Permission denied find: ' /run/user/ 1000 / gvfs': Permission denied find: ' /run/user/ 127 / doc': Permission denied find: ' /run/user/ 127 /gvfs': Permission denied
004. Solution
method 1:
Edit the /etc/ld.so.conf file and add the directory where the library file is located in a new line;
Run ldconfig to update the /etc/ld.so.cache file;
method 2:
Create any file with a .conf suffix in the /etc/ld.so.conf.d/ directory, and add the directory where the library file is located in the file;
Run ldconfig to update the /etc/ld.so.cache file;
I think the second method is more convenient, with minimal changes to the original system. Because the content of the /etc/ld.so.conf file is include /etc/ld.so.conf.d/*.conf
root@ubuntu01:/home/software/PopIns2/PopIns2# echo " /home/software/bifrost/build/src/libbifrost.so " > /etc/ld.so.conf.d/bifrost.so root@ubuntu01 : / home/software/PopIns2/PopIns2# ldconfig ## Update library files
005. Test
root@ubuntu01:/home/software/PopIns2/PopIns2# ./popins2
Read More:
- [Solved] ./my_cmake_exe: error while loading shared libraries: libswresample.so.4: 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] error while loading shared libraries: libopencv_highgui.so.3.4: cannot open shared object file…
- [619]libgtk-3.so.0 or libXt.so.6: cannot open shared object file: No such file or directory
- [Solved] import mxnet Error: OSError: libcudart.so.8.0: cannot open shared object file: No such file or directory
- [Solved] import cv2 Error: ImportError: libGL.so.1: 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
- [Solved] curl error while loading shared libraries libcrypto.so.1.0.0
- ffmpeg:error while loading shared libraries: libopenh264.so.5
- DM Install Error: error while loading shared libraries: libdmnsort.so:
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] ERROR: Could not open requirements file: [Errno 2] No such file or directory : ‘requirments.txt‘
- [Solved] mongodb Install Error: mongod: error while loading shared libraries
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- [Solved] open failed: ENOENT (No such file or directory)
- VSCode Unable to find custom header file directory: fatal error: no such file or directory
- Keil Compile Error: ..\OBJ\USART.axf: error: L6002U: Could not open file ..\obj\sys.o: No such file or directory
- [Solved] 1.fatal error: NvInfer.h: No such file or directory
- fatal error: libusb.h: No such file or directory [How to Solve]
- [Solved] fatal error: Eigen/Geometry: No such file or directory