Thanks for help. It shows nothing after I input "echo $PERL5LIB" Where should I add the command into ~/.bashrc ?
Hello,
I'm new to bioinformatics. When I use perl module in vcftools like vcf-merge. I need to use
export PERL5LIB=/path/to/your/vcftools-directory/src/perl/
to indicate where's Vcf.pm every time I logging in server.
I install vcftools with commands below
export PERL5LIB=/path/to/your/vcftools-directory/src/perl/
cd vcftools/
./autogen.sh
./configure prefix=$HOME
make
make install
Is there any advice to prevent indicating the directory of Vcf.pm every time I log in?
Thanks
1 answer
Do you have the environment variable $PERL5LIB setup? Can you post the output of echo $PERL5LIB? You could add the following to your ~/.bashrc or ~/.bash_profile:
export PERL5LIB=${PERL5LIB}:/path/to/your/vcftools-directory/src/perl/
You can add it anywhere.
The command
echo 'export PERL5LIB=${PERL5LIB}:/path/to/your/vcftools-directory/src/perl/' >> ~/.bashrc
Will append it to the end of the file for you.
You will probably want to spend a little time understanding/getting familiar with the concept of the "PATH" in Unix.
Once you have added the command to ~/.bashrc, you should run echo $PERL5LIB again to check if the changes have been saved, if it shows nothing then run source ~/.bashrc command and run the echo $PERL5LIB command again.
Log in to answer this question.