This is a test version of Biostars. For the public version, visit https://www.biostars.org.
install VCFtools on Ubuntu 18

Dear all,

I am trying to install VCFtools on Ubuntu 18. I downloaded VCFtools from the github then added

export PERL5LIB=/path/to/your/vcftools-directory/src/perl/

to bashrc then ran the suggested commands:

cd vcftools/ 
./autogen.sh 
./configure 
make 
make install

but I got:

$ make install
Making install in src
make[1]: Entering directory '/home/gigiux/src/vcftools/src'
Making install in cpp
make[2]: Entering directory '/home/gigiux/src/vcftools/src/cpp'
make[3]: Entering directory '/home/gigiux/src/vcftools/src/cpp'
 /bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c vcftools '/usr/local/bin'
/usr/bin/install: cannot create regular file '/usr/local/bin/vcftools': Permission denied
Makefile:402: recipe for target 'install-binPROGRAMS' failed
make[3]: *** [install-binPROGRAMS] Error 1
make[3]: Leaving directory '/home/gigiux/src/vcftools/src/cpp'
Makefile:966: recipe for target 'install-am' failed
make[2]: *** [install-am] Error 2
make[2]: Leaving directory '/home/gigiux/src/vcftools/src/cpp'
Makefile:320: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/gigiux/src/vcftools/src'
Makefile:363: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

What did go wrong? How can I solve it?

Thank you

ubuntu vcftools

Please use tags appropriately. This is not a "software error". Tags make sure that experts can easily find your question and provide appropriate, specific help. Better tags would have been "Ubuntu", and "vcftools".

Have you tried installation using conda?

that was the closest to the issue i could find in the dropdown list. 'ubuntu' and 'vcftools' are no listed among the tags i can use. and I can't add new tags...

There is no list for tags. They are free-form words that you type in. Some autocomplete suggestions may show up but you do not need to select them. Just keep typing until you have a complete word you want to use as a tag and then click on it to select.

thank you. I'll keep in mind for the next issue.

You should also be switching to bcftools since that seems to be the preferred method for those who do this analysis regularly.

relevant error message: /usr/bin/install: cannot create regular file '/usr/local/bin/vcftools': Permission denied

My suggestion is to move to user land installation tools such as pip, brew/homebrew, conda/bioconda. Usually, they have most recent versions and do not require system wide permissions.

I was told NOT to use sudo when making thing, anyway it worked:

$ sudo make install
Making install in src
make[1]: Entering directory '/home/gigiux/src/vcftools/src'
Making install in cpp
make[2]: Entering directory '/home/gigiux/src/vcftools/src/cpp'
make[3]: Entering directory '/home/gigiux/src/vcftools/src/cpp'
 /bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c vcftools '/usr/local/bin'
 /bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 vcftools.1 '/usr/local/share/man/man1'
make[3]: Leaving directory '/home/gigiux/src/vcftools/src/cpp'
make[2]: Leaving directory '/home/gigiux/src/vcftools/src/cpp'
Making install in perl
make[2]: Entering directory '/home/gigiux/src/vcftools/src/perl'
make[3]: Entering directory '/home/gigiux/src/vcftools/src/perl'
 /bin/mkdir -p '/usr/local/bin'
 /usr/bin/install -c fill-aa fill-an-ac fill-fs fill-ref-md5 vcf-annotate vcf-compare vcf-concat vcf-consensus vcf-contrast vcf-convert vcf-fix-newlines vcf-fix-ploidy vcf-indel-stats vcf-isec vcf-merge vcf-phased-join vcf-query vcf-shuffle-cols vcf-sort vcf-stats vcf-subset vcf-to-tab vcf-tstv vcf-validator '/usr/local/bin'
 /bin/mkdir -p '/usr/local/share/perl/5.26.1'
 /usr/bin/install -c -m 644 FaSlice.pm Vcf.pm VcfStats.pm '/usr/local/share/perl/5.26.1'
make[3]: Leaving directory '/home/gigiux/src/vcftools/src/perl'
make[2]: Leaving directory '/home/gigiux/src/vcftools/src/perl'
make[2]: Entering directory '/home/gigiux/src/vcftools/src'
make[3]: Entering directory '/home/gigiux/src/vcftools/src'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/gigiux/src/vcftools/src'
make[2]: Leaving directory '/home/gigiux/src/vcftools/src'
make[1]: Leaving directory '/home/gigiux/src/vcftools/src'
make[1]: Entering directory '/home/gigiux/src/vcftools'
make[2]: Entering directory '/home/gigiux/src/vcftools'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/gigiux/src/vcftools'
make[1]: Leaving directory '/home/gigiux/src/vcftools'

the installation seems successful:

$ vcftools

VCFtools (0.1.15)
© Adam Auton and Anthony Marcketta 2009

Process Variant Call Format files

For a list of options, please go to:
    https://vcftools.github.io/man_latest.html

Alternatively, a man page is available, type:
    man vcftools

Questions, comments, and suggestions should be emailed to:
    vcftools-help@lists.sourceforge.net

thank you

If using sudo is what fixed the issue then you should accept the answer provided by @dovi below to provide closure to this thread.

You could have also used the method suggested by dovi that places the install somewhere else thus not requiring sudo.

1 answer

You don't have permissions to write in /usr/local/bin /usr/bin/install: cannot create regular file '/usr/local/bin/vcftools': Permission denied

If you have admin permissions just use sudo make install

If you don't have permissions, try to install vcftools into a folder where you can write by using ./configure --prefix=path/to/folder/with/permission and then continue with make and make install..

Log in to answer this question.