linux - @INC XFileSharing 2.5 中的 Perl 错误 : Can't locate XFileConfig. pm

标签 linux apache perl debian

我正在尝试安装 XFileSharing 2.5。

我正在使用 Debian 8 64 位

我安装了 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 日志看看发生了什么。

这是错误“[Sat Jul 29 18:54:06.695645 2017] [:error] [pid 18153:tid 140636055983872] 无法在@INC 中找到 XFileConfig.pm(你可能需要安装 XFileConfig 模块)(@INC 包含:./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) 在/usr/lib/cgi-bin/install.cgi 第 4 行。\nBEGIN 失败——编译在/usr/lib/cgi-bin/install.cgi 第 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

我花了很多时间想弄明白。

所以我决定来这里看看是否有比我更聪明的人可以帮助我。

最佳答案

脚本有问题。它错误地假定当前目录设置为脚本所在的目录。要解决此问题,请替换

use lib '.';

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

关于linux - @INC XFileSharing 2.5 中的 Perl 错误 : Can't locate XFileConfig. pm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45392108/

相关文章:

java - 我需要添加哪个 .jar 文件以删除 netbeans 中的 thease 行中的错误

perl - 文件打开时出现 Win32::OLE 错误

c++ - 我可以在 Bigger Linux for Galileo 上的常规 C++ 程序中 #include "arduino.h"吗?

linux - SSH无密码登录失败

linux - 使用 bash 从文本文件中提取单词

javascript - 在运行 apache 的 blueonyx 服务器上找不到文件

python - 如何让apache运行pyc文件(python编译文件)

perl - 在 Perl 中打印出独特的行

Perl:使用在嵌套子目录中组织的自定义嵌套模块

c++ - 专业环境中的 Qt