Question: Error When Install Samtools, Version `Zlib_1.2.3.3` Not Found
0
gravatar for wm
3.9 years ago by
wm90
China
wm90 wrote:

samtools info: samtools-0.1.19 when I run the samtools, it comes out this error. I've installed zlib and ncurses before compile samtools.

Error:

 $./samtools: /lib64/libz.so.1: version `ZLIB_1.2.3.3' not found (required by ./samtools)

I've install zlib and ncurses at first.

  1. system info: CentOS 6.3

    $head -n 1 /etc/issue CentOS release 6.3 (Final) $uname -a Linux bilijunlab 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

when I download samtools source file "samtools-0.1.19.tar.bz2" from sourceforge.net. The following errors reported for the first time to compile

Error 1:

$make
....
collect2: ld returned 1 exit status
make[1]: *** [samtools] Error 1
make[1]: Leaving directory `/home/wangming/Documents/samtools-0.1.19'
make: *** [all-recur] Error 1

According to suggestions from online searches. It can be compiled finally after a few changes to the file "Makefile"

  1. Add the "-L/usr/local/lib -I/usr/include/ncurses" to end of line-2 of Makefile under directory of /samtools-0.1.19.

before:

CFLAGS=     -g -Wall -O2

after:

CFLAGS=         -g -Wall -O2  -L/usr/local/lib -I/usr/include/ncurses #
  1. change the "-D_CURSES_LIB=1" to "-D_CURSES_LIB=0" in the line-4

before

DFLAGS=        -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1

after

DFLAGS=        -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=0
samtools linux • 4.6k views
ADD COMMENTlink modified 3.9 years ago by cts1.5k • written 3.9 years ago by wm90
1

Thanks, Under the help of GenoMax, I fix the errors.

Here are what I did.

  1. Replace " -D_CURSES_LIB=1" by " -D_CURSES_LIB=0" in line 4 of Makefile

  2. Comment out "#LIBCURSES= -lcurses # -lXCurses" in Makefile.

  3. Delete the duplicate of "libz*" in /usr/local/lib/.

replace the "/lib64/libz.so.1.2.3" by "/usr/local/bin/libz.so.1.2.8".

ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by wm90

Worked for me too. I have put libz.so.1.2.8 file in "/usr/local/bin/". Although " -D_CURSES_LIB=1" was not there in my file, i have put " -D_CURSES_LIB=0" in line 4 of Makefile

EDIT: I tried changing the symbolic links of libz files. While doing so, I lost all the functionalities including SUDO. Whole system halted. Please never do this.

ADD REPLYlink modified 18 months ago • written 18 months ago by Prakki Rama2.0k
0
gravatar for cts
3.9 years ago by
cts1.5k
Pasadena
cts1.5k wrote:

It may be that your LD_LIBRARY_PATH environmental variable is not set to include the directory containing zlib. Looks like zlib is installed in /lib64/ so try:

$ export LD_LIBRARY_PATH="/lib64/:$LD_LIBRARY_PATH"
$ samtools

and see if the error persists

ADD COMMENTlink written 3.9 years ago by cts1.5k

Sorry, the error still there.

I also tried to create a softlink of zlib to /lib64/, it does not work.

$ln -s /lib64/libz.so.1 /usr/lib/libz.so.1
ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by wm90
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1063 users visited in the last hour