Question: Problems With Installing Vcftools On Ubuntu
1
gravatar for aghili.babak
8.2 years ago by
aghili.babak70
aghili.babak70 wrote:

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 • 4.8k views
ADD COMMENTlink modified 2.4 years ago by Biostar ♦♦ 20 • written 8.2 years ago by aghili.babak70
6
gravatar for dfornika
8.2 years ago by
dfornika1.0k
Vancouver, British Columbia, Canada
dfornika1.0k wrote:

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 COMMENTlink written 8.2 years ago by dfornika1.0k

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 REPLYlink written 8.2 years ago by aghili.babak70
1

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 REPLYlink written 8.2 years ago by dfornika1.0k

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 REPLYlink written 8.2 years ago by aghili.babak70
1
gravatar for matted
8.2 years ago by
matted7.3k
Boston, United States
matted7.3k wrote:

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 COMMENTlink written 8.2 years ago by matted7.3k
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: 987 users visited in the last hour