Problems With Installing Vcftools On Ubuntu
2
1
Entering edit mode
12.3 years ago
aghili.babak ▴ 70

Hello, so I installed a Ubuntu, downloaded VCFtools and extracted it to its home folder and also found this link: http://www.biostars.org/post/show/50107/installing-vcftools/

if I say "make" it gives me error like this:

compilation terminated. In file included from vcffileindex.cpp:8:0: vcf_file.h:26:18: fatal error: zlib.h: No such file or directory

I also was super happpy that I there is a package for it, so I said

sudo apt-get install vcftools

But that one also gave this error:

Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package vcftools

Helpeless :(

vcftools • 6.6k views
ADD COMMENT
6
Entering edit mode
12.3 years ago
dfornika ★ 1.1k

You need the header files for zlib, which aren't included in the standard zlib package. Try running:

sudo apt-get install zlib1g-dev

And then recompile your source package.

If you're trying to install from the repository using apt-get, make sure that you have the 'Universe' repository enabled.

ADD COMMENT
0
Entering edit mode

Thank you Sir. the apt-get you mentioned did fix the error and I was able to run "make" on VCFTools folder. Now do I still need to set PERL5LIB environment variable and run tabidx, etc? or now it is ready to run some commands such as vcf-to-tab ?

ADD REPLY
1
Entering edit mode

Hmm... I'm pretty sure you still have to set the PERL5LIB environment variable. Running 'make' builds the Vcf.pm perl module, but you still have to tell your perl interpreter where to find the module, since it won't be in a standard perl library directory. That's what the PERL5LIB variable does.

ADD REPLY
0
Entering edit mode

ah ok, "vcf.pm", I found that in the Perl folder... now a little confused, when the installation says set the PERL5LIB to the installation folder, where do we point it to? to the perl folder? or to the bin folder? or just to the vcftool folder? Actually I asked it here http://www.biostars.org/post/show/50272/vcftools-path-to-installation-folder/

ADD REPLY
1
Entering edit mode
12.3 years ago
matted 7.8k

Vcftools is in the Ubuntu repositories only for precise (Ubuntu 12.04) and later. So I assume you're running an older version.

Your zlib.h error means you don't have the zlib libraries installed. Fix that by running sudo apt-get install zlib1g-dev.

This post (and probably many others) has similar instructions.

ADD COMMENT

Login before adding your answer.

Traffic: 1691 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6