Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have successfully installed BioPerl.

When I try to use the objects I get an error cannot locate in @INC .....

The "build" programs put everything in the "download" directory.

I am having trouble moving the files to /usr/bin and suspect that maybe adding the "download" directory to the @INC paths might be easier.

How can I fix this?

share|improve this question
How did you install BioPerl? Did you install via sudo apt-get install bioperl? What are you using to build programs? – Kevin Bowen Dec 5 '12 at 6:04

The variable @INC is defined when Perl is compiled and it is embedded in the binary code.

The @inc array can be changed by modifying the PERL5LIB variable, from the command line, like so:

export PERL5LIB=/home/foobar/code

You can add this to either your ~/.bashrc or ~/.bash_profile(the preferred location) to make this change permanent.

Additionally, you can use the following in your script code:

use lib '/home/foobar/code';
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.