Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-10-2006, 06:30 PM   #1
Registered: Oct 2003
Location: Ireland
Distribution: Slackware 9.1, Ubuntu
Posts: 192

Rep: Reputation: 30
perl @INC variable

Ok, all I want to do is use the HTML::Parse module. I downloaded it off and installed it the way it said:

perl Makefile.PL
make test
make install
but when I try to run my program I get the following message:
Can't locate HTML/ in @INC (@INC contains: /usr/lib/perl5/5.8.0/i486-linux /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i486-linux /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at ./ line 3.
BEGIN failed--compilation aborted at ./ line 3.
I then read somewhere that if I recompile the entire Perl source that will fix it. So I downloaded the entire Perl source and compiled it (which took ages) and that still didn't work.

Whats the easiest way to fix this?
Thanks for any help
Old 07-10-2006, 09:12 PM   #2
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
Find the directory where that Perl module lives and append that to the @INC array. If that doesn't do it, then something else is wrong (unrelated to @INC).
Old 07-10-2006, 09:16 PM   #3
Registered: Feb 2003
Location: Richmond VA
Distribution: Slackware 11 -- CentOS 4.4
Posts: 115

Rep: Reputation: 15
first thing you need to do is find where (if make install succeeded) the modules were installed. if youre using $HOME/.cpan for your builds, cd to $HOME/.cpan/build/HTML-Parse-{versioninfo} <-adjust accordingly. then (hoping your locate database is up to date),

try this bash script from the command line:

for M in $(find . -type f -name '*.pm'); do 
echo "....Looking for $M Installed...."; 
locate $(basename $M 2>/dev/null) |grep -v "^$HOME\/\.cpan";echo ''; done
Old 07-11-2006, 12:17 AM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,697

Rep: Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494
Personally I find this method easier:
1. sudo to root
2. perl -e shell -MCPAN
3. install HTML::Parse


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl wont print my Variable!!! socceroos Programming 10 03-15-2006 06:04 PM
Tainted variable problem (PERL) rajatgarg Programming 1 07-29-2004 02:54 PM
Perl variable string search ugenn Programming 1 05-07-2004 09:19 PM
Perl Message board variable cadj Programming 3 04-21-2004 07:23 AM
question about $_ (default variable) in Perl realos Programming 4 07-04-2003 06:09 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration