From a recent email: Help, I've just run into this Perl error: "Can't locate module in @INC".
Solution: If you get a Perl error message like "Can't locate Foo.pm in @INC", this message means that the Perl module you're trying to include (like the module named
Foo) can't be found in Perl's include path, which is represented by the variable named
If you run into this error message, there are a couple of things that can be happening, and the following Perl blog postings I've written should help you. I've listed the posts in the order in which I think they'll help you troubleshoot your problem:
- Checking to see if a Perl module is in your @INC include path
- Where is Perl looking for modules to include?
- What to do when Perl modules aren't in their normal locations
Finally, if the Perl module you need isn't already installed on your system, you're going to need to install it. I haven't written any articles on how to install a Perl module, so if you need to install one just look at this CPAN link on installing Perl modules.
help support my writing
& keep this website running