Seqanswers Leaderboard Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • bakerwm
    Member
    • Sep 2010
    • 12

    Error for samtools, `ZLIB_1.2.3.3` not found

    Error:
    Code:
     $./samtools: /lib64/libz.so.1: version `ZLIB_1.2.3.3' not found (required by ./samtools)
    I've install zlib and ncurses at first.
    =========================
    Thanks GenoMax for the help, samtools on my server is working.

    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/.

    I replace the "/lib64/libz.so.1.2.3" by "/usr/local/bin/libz.so.1.2.8". Then result of /lib64/lib and /usr/local/lib/ directory like this:
    Code:
    $ls -l /usr/local/lib/libz*
    -rw-r--r-- 1 root root 126318 Dec 18 12:47 /usr/local/lib/libz.a
    lrwxrwxrwx 1 root root     13 Dec 18 12:47 /usr/local/lib/libz.so.1 -> libz.so.1.2.8
    -rwxr-xr-x 1 root root  99184 Dec 18 12:47 /usr/local/lib/libz.so.1.2.8
    $ls -l  /lib64/libz*
    lrwxrwxrwx 1 root root    13 Dec 19 09:42 /lib64/libz.so.1 -> libz.so.1.2.8
    -rwxr-xr-x 1 root root 99184 Dec 19 09:41 /lib64/libz.so.1.2.8
    =========================


    system info: CentOS 6.3
    Code:
    $head -n 1 /etc/issue CentOS release 6.3 (Final) 
    $uname -a Linux ***** 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 were reported for the first time to compile samtools.

    Error 1:
    Code:
    $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:
    Code:
    CFLAGS=     -g -Wall -O2
    after:
    Code:
    CFLAGS=         -g -Wall -O2  -L/usr/local/lib -I/usr/include/ncurses #
    2. change the "-D_CURSES_LIB=1" to "-D_CURSES_LIB=0" in the line-4
    before
    Code:
    DFLAGS=        -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=1
    after
    Code:
    DFLAGS=        -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_USE_KNETFILE -D_CURSES_LIB=0
    Last edited by bakerwm; 12-18-2013, 06:11 PM. Reason: Errors are fixed.
  • GenoMax
    Senior Member
    • Feb 2008
    • 7142

    #2
    If you do not have "zlib" installed then you would need to install that but if you do have zlib installed then it may be just be a matter of creating a soft-link for the library in /lib64:

    Make sure zlib is installed
    Code:
    $ rpm -qa | grep zlib
    Create the softlink (adjust names/paths according to your system)
    Code:
    $ ln -s /lib64/libz.so.1 /usr/lib/libz.so.1

    Comment

    • bakerwm
      Member
      • Sep 2010
      • 12

      #3
      Originally posted by GenoMax View Post
      If you do not have "zlib" installed then you would need to install that but if you do have zlib installed then it may be just be a matter of creating a soft-link for the library in /lib64:

      Make sure zlib is installed
      Code:
      $ rpm -qa | grep zlib
      Create the softlink (adjust names/paths according to your system)
      Code:
      $ ln -s /lib64/libz.so.1 /usr/lib/libz.so.1
      Unfortunately, the problem still there.
      Code:
      $rpm -qa |grep zlib
      zlib-devel-1.2.3-29.el6.x86_64
      zlib-1.2.3-29.el6.x86_64
      
      $file /usr/lib/libz.so.1    
      /usr/lib/libz.so.1: symbolic link to `/lib64/libz.so.1' 
      
      $./samtools 
      ./samtools: /lib64/libz.so.1: version `ZLIB_1.2.3.3' not found (required by ./samtools)

      Comment

      • GenoMax
        Senior Member
        • Feb 2008
        • 7142

        #4
        Do you have /lib64/libz.so.1? Is that readable by "all"?

        Comment

        • bakerwm
          Member
          • Sep 2010
          • 12

          #5
          Yes, here are the content in /lib64/

          Code:
          $ll /lib64/libz*
          lrwxrwxrwx 1 root root    13 Dec 17 23:39 /lib64/libz.so.1 -> libz.so.1.2.3
          -rwxrwxrwx 1 root root 91096 Feb 22  2013 /lib64/libz.so.1.2.3

          Comment

          • dpryan
            Devon Ryan
            • Jul 2011
            • 3478

            #6
            That's version 1.2.3, which is < 1.2.3.3.

            Comment

            • GenoMax
              Senior Member
              • Feb 2008
              • 7142

              #7
              I was able to compile on RedHat 6.5 by doing the following.

              Keep your #2 modification.

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

              "ncurses" library files are in /lib64 in my case. I also have libz.so.1.2.3.

              Comment

              • bakerwm
                Member
                • Sep 2010
                • 12

                #8
                Originally posted by dpryan View Post
                That's version 1.2.3, which is < 1.2.3.3.
                Sorry, I cannot fix this error/ the libz is already the latest version.

                Comment

                • bakerwm
                  Member
                  • Sep 2010
                  • 12

                  #9
                  Originally posted by GenoMax View Post
                  I was able to compile on RedHat 6.5 by doing the following.

                  Keep your #2 modification.

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

                  "ncurses" library files are in /lib64 in my case. I also have libz.so.1.2.3.
                  I did comment out "LIBCURSES= -lcurses # -lXCurses", and keep #1 & #2 modifications together.
                  compile is OK, but still report the error:
                  Code:
                  $./samtools 
                  ./samtools: /lib64/libz.so.1: version `ZLIB_1.2.3.3' not found (required by ./samtools)

                  Comment

                  • GenoMax
                    Senior Member
                    • Feb 2008
                    • 7142

                    #10
                    Samtools is working for me (albeit on RH 6.5 which is probably not fully identical to CentOS).

                    Can you try to use only your mod #2 (i.e. do not use #1) along with commenting the LIBCURSES line out?

                    Post the output of
                    Code:
                    $ ldd samtools

                    Comment

                    • bakerwm
                      Member
                      • Sep 2010
                      • 12

                      #11
                      Originally posted by GenoMax View Post
                      Samtools is working for me (albeit on RH 6.5 which is probably not fully identical to CentOS).

                      Can you try to use only your mod #2 (i.e. do not use #1) along with commenting the LIBCURSES line out?

                      Post the output of
                      Code:
                      $ ldd samtools

                      #2 + commenting LIBCURSES line, error reported as following when "make"
                      Code:
                      make[1]: *** [samtools] Error 1
                      make[1]: Leaving directory `/home/wangming/Documents/samtools-0.1.19'
                      make: *** [all-recur] Error 1
                      at least using #2 and “-L/usr/local/lib" of #1, then compile is OK.
                      Code:
                      $ldd samtools
                      ./samtools: /lib64/libz.so.1: version `ZLIB_1.2.3.3' not found (required by ./samtools)
                              linux-vdso.so.1 =>  (0x00007fffd0ef8000)
                              libm.so.6 => /lib64/libm.so.6 (0x0000003b1a400000)
                              libz.so.1 => /lib64/libz.so.1 (0x0000003547000000)
                              libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003b1ac00000)
                              libc.so.6 => /lib64/libc.so.6 (0x0000003b1a000000)
                              /lib64/ld-linux-x86-64.so.2 (0x0000003b19c00000)

                      Comment

                      • GenoMax
                        Senior Member
                        • Feb 2008
                        • 7142

                        #12
                        Looks like your executable is correctly linked (same libraries as I see).

                        Are there files in your /usr/local/lib? On my server that directory is empty. I wonder if there are duplicate copies of "libz.*" there.

                        Comment

                        • bakerwm
                          Member
                          • Sep 2010
                          • 12

                          #13
                          Originally posted by GenoMax View Post
                          Looks like your executable is correctly linked (same libraries as I see).

                          Are there files in your /usr/local/lib? On my server that directory is empty. I wonder if there are duplicate copies of "libz.*" there.
                          thanks so much ,i will try your suggestion and report how is going?

                          Comment

                          • bakerwm
                            Member
                            • Sep 2010
                            • 12

                            #14
                            Originally posted by GenoMax View Post
                            Looks like your executable is correctly linked (same libraries as I see).

                            Are there files in your /usr/local/lib? On my server that directory is empty. I wonder if there are duplicate copies of "libz.*" there.
                            Oh, Yeah, It's done, Samtools works. Thanks GenoMax for the help.

                            Here are what I did last night:
                            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. I do have duplicate of "libz*" in /usr/local/lib/. And then replace the "/lib64/libz.so.1.2.3" by "/usr/local/bin/libz.so.1.2.8". Keep the /lib64/lib and /usr/local/lib/ directory like this.
                            Code:
                            $ls -l /usr/local/lib/libz*
                            -rw-r--r-- 1 root root 126318 Dec 18 12:47 /usr/local/lib/libz.a
                            lrwxrwxrwx 1 root root     13 Dec 18 12:47 /usr/local/lib/libz.so.1 -> libz.so.1.2.8
                            -rwxr-xr-x 1 root root  99184 Dec 18 12:47 /usr/local/lib/libz.so.1.2.8
                            $ls -l  /lib64/libz*
                            lrwxrwxrwx 1 root root    13 Dec 19 09:42 /lib64/libz.so.1 -> libz.so.1.2.8
                            -rwxr-xr-x 1 root root 99184 Dec 19 09:41 /lib64/libz.so.1.2.8

                            Comment

                            • bakerwm
                              Member
                              • Sep 2010
                              • 12

                              #15
                              Originally posted by dpryan View Post
                              That's version 1.2.3, which is < 1.2.3.3.
                              Thanks, the error was fixed when I replaced the 1.2.3 version by 1.2.8.

                              Comment

                              Latest Articles

                              Collapse

                              • seqadmin
                                Pathogen Surveillance with Advanced Genomic Tools
                                by seqadmin




                                The COVID-19 pandemic highlighted the need for proactive pathogen surveillance systems. As ongoing threats like avian influenza and newly emerging infections continue to pose risks, researchers are working to improve how quickly and accurately pathogens can be identified and tracked. In a recent SEQanswers webinar, two experts discussed how next-generation sequencing (NGS) and machine learning are shaping efforts to monitor viral variation and trace the origins of infectious...
                                03-24-2025, 11:48 AM
                              • seqadmin
                                New Genomics Tools and Methods Shared at AGBT 2025
                                by seqadmin


                                This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.

                                The Headliner
                                The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...
                                03-03-2025, 01:39 PM
                              • seqadmin
                                Investigating the Gut Microbiome Through Diet and Spatial Biology
                                by seqadmin




                                The human gut contains trillions of microorganisms that impact digestion, immune functions, and overall health1. Despite major breakthroughs, we’re only beginning to understand the full extent of the microbiome’s influence on health and disease. Advances in next-generation sequencing and spatial biology have opened new windows into this complex environment, yet many questions remain. This article highlights two recent studies exploring how diet influences microbial...
                                02-24-2025, 06:31 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by seqadmin, 03-20-2025, 05:03 AM
                              0 responses
                              41 views
                              0 reactions
                              Last Post seqadmin  
                              Started by seqadmin, 03-19-2025, 07:27 AM
                              0 responses
                              46 views
                              0 reactions
                              Last Post seqadmin  
                              Started by seqadmin, 03-18-2025, 12:50 PM
                              0 responses
                              36 views
                              0 reactions
                              Last Post seqadmin  
                              Started by seqadmin, 03-03-2025, 01:15 PM
                              0 responses
                              191 views
                              0 reactions
                              Last Post seqadmin  
                              Working...