tags:

views:

138

answers:

2

I am trying to install Lingua::Lid onto a unix system (ubuntu, latest version). Of course I am root. When I go into the package to install using perl Makefile.PL I get this dumb error:

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

I have tried playing with the path on line 48, nothing changes, here is what line 48-50 looks like:

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";

The variable $BASE is declared as this:

$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});

Now the Perl program I am trying to write simply look like this (just my base):

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

When I run this trying to use Lingua, here is my error:

[root@csisl27 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.

I tried insalling this from cpan, still doesn't properly work.

+3  A: 

Here is where the trouble begins when building Lingua::LinkParser:

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

I think you need to install Link Grammar first.

If you look at the Makefile.PL that comes with the distribution, you can see the following comments:

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

which means (very indirectly) that you either do not have Link Grammar installed on your system or it is installed in a non-standard location. If it is not installed, install it first. If it is installed, specify the correct location for INC and LIBS.

As the README states:

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.

Sinan Ünür
+1  A: 

The Lid library is needed as prerequisite for Lingua::Lid. You did not install it. Buy it from its vendor: http://www.lingua-systems.com/request-quote/index.html?product=lid

daxim
+1 I did miss that part.
Sinan Ünür