This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Building Vcftools Executable Part 2!

I want to create the vcftools executable. I don't have a linux/unix system myself, so based on advice I got on this forum, I installed Ubuntu 10.10 (Maverick Meerkat) on virtualbox on my Windows XP machine. On running make, as the VCFtools documentation advises, I get the following message:

nasir@nasir-VirtualBox:~/Downloads/vcftools_0.1.4a$ make

make[1]: Entering directory `/home/nasir/Downloads/vcftools_0.1.4a/cpp'

g++ -O2 -Wall -Wextra vcftools.cpp vcf_file.cpp vcf_entry.cpp vcf_entry_getters.cpp vcf_entry_setters.cpp vcf_file_filters.cpp vcf_file_output.cpp vcf_file_format_convert.cpp vcf_file_diff.cpp parameters.cpp output_log.cpp -o vcftools -lz

make[1]: g++: Command not found

make[1]: * [vcftools] Error 127

make[1]: Leaving directory `/home/nasir/Downloads/vcftools_0.1.4a/cpp'

cd: 2: can't cd to perl

make: * [install] Error 2

What's going wrong? I would be very grateful for advice as I am, as yet, not familiar enough with linux to figure it out exactly.

vcftools

2 answers

You'll probably find that you're not just missing the g++ package, so the easiest way to install all the relevant packages on Ubuntu (and Debian) is to do:

sudo apt-get build-essential

Many thanks Pierre and Ian. Once I installed g++ as Pierre suggested, I got another error on running make 'cannot find zlib.h'. This was fixed by running sudo apt-get install zlib1g-dev. Perhaps what Ian has suggested might have been a short-cut to this. In any case, I an now able to use the vcftools executable, so many thanks all!

Hi Nasir now i have just installed ubuntu from a vitualbox on my windows 7, so i want to instal the VCFTOOLS what is the first thing i need to do because i am a bit confused. thanks

g++: Command not found

means that you're missing the GNU compiler for C++ . It has not been installed on your machine or it is missing in your path.

you can use either yum or apt-get to install g++ (it depends of your linux distro).

For apt-get, the command should be

apt-get install g++.

(you must be root with an internet connection)

Log in to answer this question.