Why does my Perl program complain “Can't locate URI.pm in @INC”?

后端 未结 5 1307
臣服心动
臣服心动 2021-01-03 07:47

I\'m new to Perl. I get the following error when I run a script:

Can\'t locate URI.pm in @INC (@INC contains: /usr/local/packages/perl_remote/5.6.1/lib/5.6.1/i86pc         


        
5条回答
  •  不知归路
    2021-01-03 08:42

    This is not to say that any of the other answers aren't all good advice (they very likely address your issue), but I ran into a similar issue which had me puzzled for a couple hours. While I'm not sure this addresses the OP's problem, perhaps someone stumbling across this in the future will save themselves some time troubleshooting...

    I found on a new CentOS server that despite @INC reporting the path to my custom libraries included and despite all file and directory permissions being set correctly mod_perl was still bailing out with a message that it "Can't locate" the modules in question. This was doubly puzzling because similar scripts with the same "use lib" statement that Apache's PerlRequire was using were able to run without issue.

    The culprit turned out to be SELinux, and disabling it took care of this immediately. More details on the /var/log/messages info that led me to this as well as other general gripes can be found here.

提交回复
热议问题