bdd 启动 data processing进程报错 Can't locate in @INC

2017-03-10 10:31:58来源:作者:wonder的地下室人点击

bdd 启动 data processing进程报错 Can't locate in @INC

Can't locate in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).

BEGIN failed--compilation aborted.

安装CPAN的方法 yum -y install perl-CPAN


History of LWP

Introduction to Web Automation

Words of Caution

1.3. Installing LWP

LWP and the associated modules areavailablein various distributions free from the Comprehensive Perl ArchiveNetwork (CPAN). The main distributionsare listed at the start ofAppendix A, "LWP Modules"
, although thedetails of which modules are in which distributions changeoccasionally.

If you're using ActivePerl forWindows or MacPerlfor Mac OS 9, you already have LWP. If you're onUnix and you don't already have LWP installed,you'll need to install it from CPAN usinginstructions given in the next section.

To test whether you already have LWP installed:

% perl -MLWP -le "print(LWP->VERSION)"

(The second character in-le
is a lowercase L, nota digit one.)

If you see:

Can't locate LWP in @INC (@INC contains: ...lots of paths...).
BEGIN failed--compilation aborted.

or if you see a version number lower than 5.64, you need to installLWP on your system.

There are two ways to install modules: using the CPAN shell or theold-fashioned manual way.

1.3.1. Installing LWP from the CPAN Shell

The CPAN shell is a command-line environmentfor automatically downloading,building, and installing modules from CPAN. Configuring

If you have never used the CPAN shell, you will need to configure itbefore you can use it. It will prompt you for some information beforebuilding its configuration file.

Invoke the CPAN shell by entering the following command at a systemshell prompt:

% perl -MCPAN -eshell

If you've never run it before,you'll see this:

We have to reconfigure due to following uninitialized parameters:

followed by a number of questions. For each question, the defaultanswer is typically fine, but you may answer otherwise if you knowthat the default setting is wrong or not optimal. Onceyou've answered all the questions, a configurationfile is created and you can start working with the CPAN shell. Obtaining help

If you need help at any time, you can read the CPANshell's manual page by typingperldoc
or by starting upthe CPAN shell (withperl
at a systemshell prompt) and enteringh
at thecpan>

cpan> h

Display Information
a,b,d,mWORD or /REGEXP/about authors, bundles, distributions, modules
iWORD or /REGEXP/about anything of above
rNONEreinstall recommendations
ls AUTHORabout files in the author's directory

Download, Test, Make, Install...
make make (implies get)
testMODULES, make test (implies make)
install DISTS, BUNDLES make install (implies test)
cleanmake clean
look open subshell in these dists' directories
readme display these dists' README files

h,? display this menu ! perl-code eval a perl command
o conf [opt]set and query options q quit the cpan shell
reload cpan load againreload indexload newer indices
autobundleSnapshotforce cmd unconditionally do cmd Installing LWP

All you have to do is enter:

cpan> install Bundle::LWP

The CPAN shell will show messages explaining whatit's up to. You may need to answer questions toconfigure the various modules (e.g., libnet asks for mail hosts andso on for testing purposes).

After much activity, you should then have a fresh copy of LWP on yoursystem, with far less work than installing it manually onedistribution at a time. At the time of this writing,installBundle::LWP
installs not just the libwww-perl distribution,but also URI and HTML-Parser. It does not install the HTML-Treedistribution that we'll use inChapter 9, "HTML Processing with Trees"
andChapter 10, "Modifying HTML with Trees"
. To do that,enter:

cpan> install HTML::Tree

These commands do not install the HTML-Format distribution, which wasalso once part of the LWP distribution. I do not discuss HTML-Formatin this book, but if you want to install it so that you have acomplete LWP installation, enter this command:

cpan> install HTML::Format

Remember, LWP may be just about the most popular distribution inCPAN, but that's not all there is! Look around theweb-related parts of CPAN (I prefer the interface at
, but you can also try
) asthere are dozens of modules, from WWW::Automate to SOAP::Lite, thatcan simplify your web-related tasks.

1.3.2. Installing LWP Manually

The normal Perl moduleinstallation procedure is summed up inthe documentperlmodinstall
. You can read thisby runningperldoc
at a shell prompt or online at

CPAN is a network of a large collection of Perl software anddocumentation. See the CPAN FAQ at
formore information about CPAN and modules. Download distributions

First, download the moduledistributions.LWP requires several other modules to operate successfully.You'll need to install the distributions given inTable 1-1
, in the order in which they are listed.

Table 1-1. Modules used in this book


CPAN directory



















Fetch these modules from one of the FTP or web sites that form CPAN,listed at
. SometimesCPAN has several versions of a module in theauthors
directory. Be sure to check the versionnumber and get the latest.This book is about the latest version of LWP! Upgrade now!

For example to install MIME-Base64, you might first fetch
tosee which versions are there, then fetch
and install that. Unpack and configure

The distributions are gzipped tararchives of source code.Extracting a distribution creates a directory, and in that directoryis aMakefile.PL
Perl program that builds aMakefile
for you.

% tar xzf MIME-Base64-2.12.tar.gz
% cd MIME-Base64-2.12
% perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for MIME::Base64 Make, test, and install

Compile the code with themake

% make
cp blib/lib/MIME/
cp blib/lib/MIME/
/usr/bin/perl -I/opt/perl5/5.6.1/i386-freebsd -I/opt/perl5/5.6.1
/opt/perl5/5.6.1/ExtUtils/typemap Base64.xs > Base64.xsc && mv
Base64.xsc Base64.c
cc -c-fno-strict-aliasing -I/usr/local/include -O-DVERSION=/"2.12/"
-DXS_VERSION=/"2.12/" -DPIC -fpic -I/opt/perl5/5.6.1/i386-freebsd/CORE
Running Mkbootstrap for MIME::Base64 ( )
chmod 644
rm -f blib/arch/auto/MIME/Base64/
LD_RUN_PATH="" cc -o blib/arch/auto/MIME/Base64/
-L/opt Base64.o
chmod 755 blib/arch/auto/MIME/Base64/
cp blib/arch/auto/MIME/Base64/
chmod 644 blib/arch/auto/MIME/Base64/
Manifying blib/man3/MIME::Base64.3
Manifying blib/man3/MIME::QuotedPrint.3

Then make sure everything works on your system withmaketest

% make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/opt/perl5/5.6.1/i386-freebsd -I/opt/perl5/5.6.1 -e 'use Test::Harness
qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/unicode.........skipped test on this platform
All tests successful, 1 test skipped.
Files=3, Tests=306,1 wallclock secs ( 0.52 cusr +0.06 csys =0.58 CPU)

If it passes the tests, install it withmake
(as the superuser):

# make install
Installing /opt/perl5/site_perl/5.6.1/i386-freebsd/auto/MIME/Base64/
Installing /opt/perl5/site_perl/5.6.1/i386-freebsd/auto/MIME/Base64/
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Installing /opt/perl5/site_perl/5.6.1/i386-freebsd/MIME/
Installing /opt/perl5/site_perl/5.6.1/i386-freebsd/MIME/
Installing /usr/local/man/man3/MIME::Base64.3
Installing /usr/local/man/man3/MIME::QuotedPrint.3
Writing /opt/perl5/site_perl/5.6.1/i386-freebsd/auto/MIME/Base64/.packlist
Appending installation info to /opt/perl5/5.6.1/i386-freebsd/perllocal.pod

Continue to section:Words of Caution



yum install perl-LWP-UserAgent-Determined.noarch