首页 文章

Perl错误:无法在@INC XFileSharing 2.5中找到XFileConfig.pm

提问于
浏览
0

我正在尝试安装 XFileSharing 2.5.

我使用的是Debian 8 64bit

我安装了apache2,mod_perl,激活了mod_rewrite等.cgi-bin位置在:/ usr / lib / cgi-bin(运行perl脚本的文件夹)

我有/ var / www / html(包含HTML文件的文件夹)

我按照这些说明操作:https://pastebin.com/47vARv60

我在“2)将install.cgi权限设置为755.然后在浏览器中打开它(例如server.com/cgi-bin/install.cgi)”问题从这里开始 .

Internal Server Error

The server encountered an internal error or misconfiguration and was unable 
to complete your request.

Please contact the server administrator at webmaster@localhost to inform them 
of the time this error occurred, and the actions you performed just before 
this error.

More information about this error may be available in the server error log.

所以我去了apache日志看看发生了什么 .

And this is the error "[Sat Jul 29 18:54:06.695645 2017] [:error] [pid 18153:tid 140636055983872] Can't locate XFileConfig.pm in @INC (you may need to install the XFileConfig module) (@INC contains: . /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl /etc/apache2) at /usr/lib/cgi-bin/install.cgi line 4.\nBEGIN failed--compilation aborted at /usr/lib/cgi-bin/install.cgi line 4.\n"

似乎无法找到XFileConfig.pm但该文件存在 .

root@Server:~# updatedb
root@Server:~# locate XFileConfig.pm
/usr/lib/cgi-bin/XFileConfig.pm

该文件位于“/usr/lib/cgi-bin/XFileConfig.pm”中.install.cgi文件位于/usr/lib/cgi-bin/install.cgi中 .

为什么似乎无法找到文件?这是install.cgi代码 . https://pastebin.com/LHjcSEDK

我花了几个小时试图解决它 .

所以我决定来这里看看是否有人能比我更聪明 .

2 回答

  • 2

    该脚本是错误的 . 它错误地假定当前目录设置为脚本所在的目录 . 要解决这个问题,请更换

    use lib '.';
    

    use FindBin qw( $RealBin );
    use lib $RealBin;
    
  • 2

    很有可能是因为你使用mod_perl处理程序运行它 . XFilesharing Pro必须在常规CGI环境下运行 . 尝试禁用mod_perl - 这应该可以解决您的问题 .

相关问题