Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to install the software package samtools0.1.19. When I run make, I get errors:

gcc -g -Wall -O2 -o samtools bam_tview.o bam_plcmd.o sam_view.o bam_rmdup.o bam_rmdupse.o bam_mate.o bam_stat.o bam_color.o bamtk.o kaln.o bam2bcf.o bam2bcf_indel.o errmod.o sample.o cut_target.o phase.o bam2depth.o padding.o bedcov.o bamshuf.o bam_tview_curses.o bam_tview_html.o  libbam.a -Lbcftools -lbcf  -lcurses  -lm -lz -lpthread
phase.o: In function `loadpos':
/illumina/data/galaxy/apps/samtools-0.1.19/phase.c:475: undefined reference to `gzopen64'
bedcov.o: In function `main_bedcov':
/illumina/data/galaxy/apps/samtools-0.1.19/bedcov.c:69: undefined reference to `gzopen64'
libbam.a(bam_import.o): In function `__bam_get_lines':
/illumina/data/galaxy/apps/samtools-0.1.19/bam_import.c:76: undefined reference to `gzopen64'
libbam.a(bam_import.o): In function `sam_open':
/illumina/data/galaxy/apps/samtools-0.1.19/bam_import.c:472: undefined reference to `gzopen64'
libbam.a(bam_import.o): In function `sam_header_read2':
/illumina/data/galaxy/apps/samtools-0.1.19/bam_import.c:126: undefined reference to `gzopen64'
libbam.a(bedidx.o):/illumina/data/galaxy/apps/samtools-0.1.19/bedidx.c:107: more undefined references to `gzopen64' follow
collect2: ld returned 1 exit status
make[1]: *** [samtools] Error 1
make[1]: Leaving directory `/illumina/data/galaxy/apps/samtools-0.1.19'
make: *** [all-recur] Error 1

I tried installing the packages it depends on, and even used elrepo for Red Hat Linux but it doesn't work.

share|improve this question

migrated from serverfault.com Jun 1 '13 at 20:11

This question came from our site for professional system and network administrators.

    
Did you install the zlib-devel package, or did you replace the system zlib with a different copy? –  Michael Hampton Jun 1 '13 at 6:44
    
Hi,i installed zlib-1.2.8.. –  sridhar Jun 1 '13 at 6:54
1  
Yes, that would cause the problem. Remove it and use the system zlib ande zlib-devel packages instead. –  Michael Hampton Jun 1 '13 at 6:56
    
Thanks for the reply.. could you please explain in detail.. should i install both zlib and zlid-dlevel packages?? also could you mention the version for both zlib and zlib-dlevel packages?? i am using redhat linux 6.1(santiago).. –  sridhar Jun 1 '13 at 7:12
    
Don't use elrepo for packages that exist in RHEL proper... –  Dennis Kaarsemaker Jun 1 '13 at 7:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.