Can't locate ... in @INC

http://perlmaven.com/cant-locate-in-inc

One of the frequent compile time errors people get from Perl looks like this:Can't locate Acme/NameX.pm in @INC (@INC contains: ... )

Starting from perl version 5.18 it will say:

Can't locate Acme/NameX.pm in @INC (you may need to install the Acme::NameX module) (@INC contains: ... )

This error means your code is trying to load the Acme::NameX module, but cannot find it.

You probably have either use Acme::NameX or require Acme::NameX somewhere in your code.

In order to load this module, Perl will go over the directories listed in an internal array of Perl called @INC. In each directory it will look for a subdirectory called Acme, and inside that subdirectory a file called NameX.pm.

If it cannot find the file, then you will get the above error.
原因:大小写敏感,如use acme::name, it will not find the module Acme::Name.

   没有安装所需模块

  If you have just installed the module, then either it was installed in a non-standard place, or it actually failed the installation.

解决:

If, for some reason it was installed in a non-standard directory, you can change the @INC array in several ways.

原文地址:https://www.cnblogs.com/tina-ma/p/4312455.html