How to Solve: Can’t locate xxx.pm in @INC (@INC contains: …) in Perl [Quick Tip]

Problem:

When you install a Perl module, which depends upon other module, in a private directory, you may encounter an error like this:

Can’t locate Perl_Module_Name.pm in @INC (@INC contains: blah blah)

Reason:

As you can see, INC contains every other thing than the directory where your Perl module is installed.

Solution:

Try adding the concerned directory in the Perl library path like this:

export PERL5LIB=Path_to_the_Perl_Module_library

Hope it solves your problem.