/home/software/MashMap/mashmap: error while loading shared libraries: libgsl.so.23: cannot open shared object file: No such file or directory
Closed this issue · 12 comments
Please excuse my lack of informatics skills, but I'm having trouble with mashmap installation.
I'm using CentOS 7.3.1611 with gcc 4.8.5 20150623.
I installed gsl-2.4, then configured mashmap with:
$./bootstrap.sh
$./configure --with-gsl=/home/software/gsl-2.4/
$make
$/home/software/mashmap -s S15-132.contigs.fasta -q S15_132.1.subreads.fastq -o test1
Returns:
/home/software/MashMap/mashmap: error while loading shared libraries: libgsl.so.23: cannot open shared object file: No such file or directory
I also removed the Mashmap directory and did a clean installation using the prefix:
./configure --prefix=/usr/local/ --with-gsl=/home/software/gsl-2.4/
make
It does not install the binary in /usr/local/bin/ (it installs in the Mashmap directory) and still give the same error as above.
BTW, I am performing the install as 'root'.
Can you try --with-gsl=/home/software/gsl-2.4/build
and see if it works?
####Details below but that did not work.
####I removed the directory and did a fresh install:
[root@rambo software]# git clone https://github.com/marbl/MashMap.git
Cloning into 'MashMap'...
remote: Counting objects: 219, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 219 (delta 0), reused 3 (delta 0), pack-reused 211
Receiving objects: 100% (219/219), 120.90 KiB | 0 bytes/s, done.
Resolving deltas: 100% (115/115), done.
[root@rambo software]# cd MashMap/
[root@rambo MashMap]# ./bootstrap.sh
[root@rambo MashMap]# ./configure --with-gsl=/home/software/gsl-2.4/build
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking gsl/gsl_cdf.h usability... yes
checking gsl/gsl_cdf.h presence... yes
checking for gsl/gsl_cdf.h... yes
configure: creating ./config.status
config.status: creating Makefile
[root@rambo MashMap]# make
g++ -c -O3 -DNDEBUG -std=c++11 -Isrc -I /home/software/gsl-2.4/build/include -include src/common/memcpyLink.h -Wl,--wrap=memcpy -o src/map/mash_map.o src/map/mash_map.cpp
g++ -O3 -DNDEBUG -std=c++11 -Isrc -I /home/software/gsl-2.4/build/include -include src/common/memcpyLink.h -Wl,--wrap=memcpy src/map/mash_map.o -o mashmap -L/home/software/gsl-2.4/build/lib -lgsl -lgslcblas -lstdc++ -lz -lm -lpthread
[root@rambo MashMap]# ./mashmap
./mashmap: error while loading shared libraries: libgsl.so.23: cannot open shared object file: No such file or directory
####Tried adding frontslash at end of 'build'
[root@rambo MashMap]# cd ..
[root@rambo software]# rm -rf MashMap/
[root@rambo software]# git clone https://github.com/marbl/MashMap.git
Cloning into 'MashMap'...
remote: Counting objects: 219, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 219 (delta 0), reused 3 (delta 0), pack-reused 211
Receiving objects: 100% (219/219), 120.90 KiB | 0 bytes/s, done.
Resolving deltas: 100% (115/115), done.
[root@rambo software]# cd MashMap/
[root@rambo MashMap]# ./bootstrap.sh
[root@rambo MashMap]# ./configure --with-gsl=/home/software/gsl-2.4/build/
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking gsl/gsl_cdf.h usability... yes
checking gsl/gsl_cdf.h presence... yes
checking for gsl/gsl_cdf.h... yes
configure: creating ./config.status
config.status: creating Makefile
[root@rambo MashMap]# make
g++ -c -O3 -DNDEBUG -std=c++11 -Isrc -I /home/software/gsl-2.4/build//include -include src/common/memcpyLink.h -Wl,--wrap=memcpy -o src/map/mash_map.o src/map/mash_map.cpp
g++ -O3 -DNDEBUG -std=c++11 -Isrc -I /home/software/gsl-2.4/build//include -include src/common/memcpyLink.h -Wl,--wrap=memcpy src/map/mash_map.o -o mashmap -L/home/software/gsl-2.4/build//lib -lgsl -lgslcblas -lstdc++ -lz -lm -lpthread
[root@rambo MashMap]# ./mashmap -h
./mashmap: error while loading shared libraries: libgsl.so.23: cannot open shared object file: No such file or directory
This should be because program is failing to find the gsl library in your library path at runtime.
In your environment file, you should update the variable LD_LIBRARY_PATH
to include /home/software/gsl-2.4/build/lib
More details here.
Mashmap executable is not able to find the libgsl library. It is usually searched in the paths specified by the LD_LIBRARY_PATH environment variable. When you install gsl, it should generate the build libraries for you.
Yes, I understand. So apparently gsl is not installing properly since it does not produce a /build directory. I will try releases earlier than v2.4.
Or it may be placing the libraries in some other directory. I am not sure what the default location is, perhaps /usr/local/lib
?
Yes, they're in /usr/local/lib/ and I have tried to point to that during configuration and it seems happy to find the libraries there.
...
[root@rambo Mashmap]$./bootstrap.sh
[root@rambo Mashmap]$./configure --with-gsl=/usr/local/lib
checking gsl/gsl_cdf.h usability... yes
checking gsl/gsl_cdf.h presence... yes
checking for gsl/gsl_cdf.h... yes
configure: creating ./config.status
config.status: creating Makefile
[root@rambo Mashmap]$make
[root@rambo Mashmap]$ ./mashmap
./mashmap: error while loading shared libraries: libgsl.so.19: cannot open shared object file: No such file or directory
###Here are the libraries in /usr/local/lib/
[root@rambo lib]$ ll libgsl*
-rw-r--r--. 1 root root 19081320 Aug 21 16:11 libgsl.a
-rw-r--r--. 1 root root 1757170 Aug 21 16:11 libgslcblas.a
-rwxr-xr-x. 1 root root 949 Aug 21 16:11 libgslcblas.la
lrwxrwxrwx. 1 root root 20 Aug 21 16:11 libgslcblas.so -> libgslcblas.so.0.0.0
lrwxrwxrwx. 1 root root 20 Aug 21 16:11 libgslcblas.so.0 -> libgslcblas.so.0.0.0
-rwxr-xr-x. 1 root root 1047600 Aug 21 16:11 libgslcblas.so.0.0.0
-rwxr-xr-x. 1 root root 918 Aug 21 16:11 libgsl.la
lrwxrwxrwx. 1 root root 16 Aug 21 16:11 libgsl.so -> libgsl.so.19.3.0
lrwxrwxrwx. 1 root root 16 Aug 21 16:11 libgsl.so.19 -> libgsl.so.19.3.0
-rwxr-xr-x. 1 root root 11293856 Aug 21 16:11 libgsl.so.19.3.0
Is /usr/local/lib in LD_LIBRARY_PATH? What does echo $LD_LIBRARY_PATH report?