2010-03-22 30 views
3

我试图将Lingua::Lid安装到unix系统上(ubuntu,最新版本)。当然,我是根。当我进入包装使用perl Makefile.PL我得到这个愚蠢的错误安装:如何安装Perl的Lingua :: Lid?

[[email protected] Lingua-Lid-0.01]# perl Makefile.PL 
/opt/ls//lib does not exist at Makefile.PL line 48. 

我试图用线48路玩,没有什么变化,这里是行48-50的样子:

Line 48: die "$BASE/lib does not exist"  unless -d "$BASE/lib"; 
Line 49: die "$BASE/include does not exist" unless -d "$BASE/include"; 
Line 50: die "lid.h is missing in $BASE/include" unless -e "$BASE/includ/lid.h";

变量$ BASE是声明为此:

$BASE = "/opt/ls/"   if ($^O eq "linux" or $^O eq "solaris"); 
$BASE = "/usr/local/"  if ($^O eq "freebsd"); 
$BASE = $ENV{LID_BASE_DIR} if (defined $ENV{LID_BASE_DIR}); 

现在Perl程序,我想简单地写这个样子(只是我的基地):

#!/usr/bin/perl 
use Lingua::LinkParser; 
use strict; 
print "Hello world!\n"; 

当我运行这个欲以器语言,这里是我的错误:

[[email protected] assign4]# ./perl_parser_1.pl

Can't locate Lingua/LinkParser.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/5.10.0/x86_64-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl .) at ./perl_parser_1.pl line 3. BEGIN failed--compilation aborted at ./perl_parser_1.pl line 3.

我试图从CPAN insalling此,仍不能正常工作。

+2

当您尝试从CPAN安装Lingua :: LinkParser时,您会得到什么错误? – zigdon 2010-03-22 19:37:14

+1

根据CPAN测试人员,没有通过测试。另外,还有Bug报告。所以,我怀疑user299306已经遇到了与其他问题相同的问题。 – toolic 2010-03-22 19:48:08

回答

4

这里就是麻烦建设Lingua::LinkParser时开始:

LinkParser.xs:5:27: error: link-includes.h: No such file or directory

我认为你需要安装Link Grammar第一。

如果你看一下附带的分布Makefile.PL,你可以看到如下评论:

# 'LIBS' => "-L/dbrian/link-grammar-4.4.3/link-grammar/.libs/ -llink-grammar", 
# 'INC' => "-I/dbrian/link-grammar-4.4.3/link-grammar/" 

这意味着(非常间接的),你要么是没有安装在系统上Link Grammar或者是安装在非标准位置。如果未安装,请先安装。如果已安装,请指定INCLIBS的正确位置。

由于README状态:

Before you build this package, it is highly recommended that you install the link parser package with make install , which will put the libs, headers, and dictionary files in standard locations. This build no longer prompts for package directories, so if you want to build with non-standard locations, you'll need to edit Makefile.PL to make that happen. In particular, pay attention to the INCLUDE parameter.