Perl Can';t定位字符串/Random.pm

Perl Can';t定位字符串/Random.pm,perl,Perl,嗨,伙计们,我在perl上有个错误 当我运行它到browsert时,我得到了内部服务器错误 在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/shar

嗨,伙计们,我在perl上有个错误 当我运行它到browsert时,我得到了内部服务器错误 在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;
我希望你能帮助我。。。
提前感谢

很可能,您需要安装
String::Random

sudo cpan String::Random
通常,
cpan
将自动安装依赖项,但这确实依赖于在模块元数据中声明它们(您正在安装的模块显然有很长的历史,因此可能遗漏了一些依赖项)。您可能会发现安装工作正常,但还有更多的依赖性问题-只需一次安装一个即可

 perl -MCPAN -e 'install String::Random'
阅读此文以了解有关安装perl模块的更多信息:

String::Random未安装。安装它。如何安装它?ubuntu中的命令是什么?抱歉,perl中的新手。。。提前感谢Ubuntu:
sudo apt get install libstring random perl
,如果您使用的是默认系统perl。如果您有一些自定义设置,请执行
cpanm String::Random
或类似操作。非常感谢各位,我现在修复了错误“谢谢”。请小心
String::Random
。它是由Steven Pritchard于1999年编写的,但Shlomi Fish声称它没有任何更改。或者,
sudo apt get-install-libstring-random-perl
建议阅读:最近有人建议在适当的情况下使用本机包管理器。我认为它有一个相当合理的理由。