大家好,我有一个与Perl相关的错误。当我在浏览器中运行它时,会出现内部服务器错误;而当我在Ubuntu命令行中运行它时,也会出现错误。
Can't locate String/Random.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib
/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at CybOrg/Main.pm line 40.
BEGIN failed--compilation aborted at CybOrg/Main.pm line 40.
Compilation failed in require at login.pl line 26.
BEGIN failed--compilation aborted at login.pl line 26.
这是代码...
#!/usr/bin/perl
#
# CybOrg - The Cybercafe Organizer
# http://cyborg.sourceforge.net
#
# Copyright (C) 2003 - The CybOrg Project
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
use strict;
use warnings 'all';
use CybOrg::Main;
use CybOrg::Config;
use CybOrg::CGI;
use CybOrg::DB;
my $user_ok;
eval {
$user_ok = db_validate_user($params{'username'},$params{'password'});
};
if ($@) {
$user_ok = '';
}
if ($user_ok) {
my $session = send_cookie($params{'username'});
eval {
db_update_session($params{'username'}, $session);
};
if ($@) {
redirect('cyborg.pl');
} else {
redirect('list.pl');
}
} else {
expire_cookie;
redirect('cyborg.pl');
}
1;
I hoped U will help me... THANKS IN ADVANCE
sudo apt-get install libstring-random-perl
。如果您有一些自定义设置,请执行cpanm String::Random
或类似的操作。 - amonString::Random
。它是由 Steven Pritchard 在1999年编写的,但被 Shlomi Fish 声称并未做出任何更改。 - Borodin