I'm trying to install HTML::TreeBuilder::XPath as user. but I get this error :
Building and testing HTML-Parser-3.71 ... FAIL
! Installing HTML::Entities failed. See /home/user/.cpanm/build.log for details.
So if I take a look at this file /home/user/.cpanm/build.log I get this error :
Result: FAIL
Failed 3/48 test programs. 0/423 subtests failed.
make: *** [test_dynamic] Error 255
-> FAIL Installing HTML::Entities failed. See /home/user/.cpanm/build.log for details.
Searching HTML::Parser on cpanmetadb ...
Already tried HTML-Parser-3.71. Skipping.
Already tried HTML::Tagset. Skipping.
-> FAIL Bailing out the installation for HTML-Tree-5.03. Retry with --prompt or --force.
-> FAIL Bailing out the installation for HTML-TreeBuilder-XPath-0.14. Retry with --prompt or --force.
3 distributions installed
So I try to manualy install HTML::Entities and I get this error :
Successfully installed HTML-Tagset-3.20
Building and testing HTML-Parser-3.71 ... FAIL
! Installing HTML::Entities failed. See /home/user/.cpanm/build.log for details.
1 distribution installed
Can't locate HTML/Tagset.pm in #INC (#INC contains: /home/user/.cpanm/work/1403630727.28688/HTML-Parser-3.71/blib/lib /home/user/.cpanm/work/1403630727.28688/HTML-Parser-3.71/blib/arch /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 /home/user/.cpanm/work/1403630727.28688/HTML-Parser-3.71/blib/lib/HTML/TokeParser.pm line 10.
So it say it can't locate HTML::Tagset, but it has been installed just a few line before ! And at the end, I get this errors :
Result: FAIL
Failed 3/48 test programs. 0/423 subtests failed.
make: *** [test_dynamic] Error 255
-> FAIL Installing HTML::Entities failed. See /home/user/.cpanm/build.log for details.
1 distribution installed
and if I take a look at /home/user/.cpanm/build.log I get exactly the same output.
What's wrong please ?
Given that you cannot find the HTML::Tagset module from the command line, it is possible you did not actually install it, despite being told that you had.
One other test for it wold be:
$ perldoc HTML::Tagset
Then I would look for it using locate(1)
$ locate HTML/Tagset.pm
You may get a lot of output that you'll have to go through, or you might get none. You might be told that the database that locate relies on is not initialized, or is out of date. You can either refresh the database, or try find(1)
$ find / -name 'Tagset.pm' -print | less
If you still cant find it, or you grow tired of searching, then just fire up your favorite CPAN client, and install HTML::Tagset and then HTML::Entities explicitly.
I havent told cpanminus to use my local library.
Here is the solution to install all module as user :
cd ~/;
cpanm local::lib;
echo 'eval `perl -I$HOME/perl5/lib/perl5 -Mlocal::lib`' >> ~/.bashrc ;
source ~/.bashrc;
after that, I can install all modules and dependancies as user with
cpanm module::name
Related
Here I explain more about troubles installing some Perl libraries:
trouble installing Set::IntervalTree
** I installed g++ - still the same issue
** I installed miniconda, and tried to conda the package - still having the same issue
here are the complete error logs:
** I copy part of it - as it is too long!
cpan Set::IntervalTree
Can't locate ExtUtils/CppGuess.pm in #INC (#INC contains: C:/Strawberry/perl/site/lib C:/Strawberry/perl/vendor/lib C:/Strawberry/perl/lib .) at Makefile.PL line 11.
BEGIN failed--compilation aborted at Makefile.PL line 11.
Warning: No success on command[C:\Strawberry\perl\bin\perl.exe Makefile.PL]
SLOYD/Set-IntervalTree-0.12.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
I face similar problem trying to cpan Algorithm::ExpectationMaximization
one dependency not OK (Math::GSL); additionally test harness failed
C:\Strawberry\c\bin\dmake.EXE test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports AVIKAK/Algorithm-ExpectationMaximization-1.22.tar.gz
Running make install
make test had returned bad status, won't install without force
Suggestions:
Create a gist of the full log and post the link to it here. If you are philosophically opposed to GitHub, I believe there are other places you could post, but I don't know how permanent they are.
cpan and its related programs all (I believe) have options to automatically install dependencies which you do not already have installed. I wonder if deleting you cpan config file and reconfiguring to make sure that that option is set would help.
If the log of the run does not show it, make sure to add the output of perl -V to the gist. Perl version info helps in these situations.
I have a scsript that uses package LWP::Curl
But when I try to install it using this command [sudo cpanm install LWP::Curl] get the following error :-
Fetching http://www.cpan.org/authors/id/S/SY/SYP/Net-Curl-0.37.tar.gz
-> OK
Unpacking Net-Curl-0.37.tar.gz
Entering Net-Curl-0.37
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker::Config 0 ... Yes (6.66)
Configuring Net-Curl-0.37
Running Makefile.PL
pkgconfig failed:
Can't locate ExtUtils/PkgConfig.pm in #INC (you may need to install the ExtUtils::PkgConfig module) (#INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at Makefile.PL line 39.
Using curl-config script.
Can't exec "curl-config": No such file or directory at Makefile.PL line 212.
curl-config failed:
Execution curl-config --vernum failed.
is your libcurl installed correctly ?
libcurl development files do not seem to be available
You must install libcurl 7.15.5 or newer to
build this module
NA: Unable to build distribution on this platform.
-> N/A
-> FAIL Configure failed for Net-Curl-0.37. See /home/harsh/.cpanm/work/1460968559.18563/build.log for details.
I am new to Perl , How can this be resolved?
Sounds like a bug in the Net::CURL package and it fails to list its dependencies correctly.
Install ExtUtils::PkgConfig first (just like the error message says).
Then install libcurl (the -dev version if your platform distinguishes between that and the base package) using your platform's package management system (again, like the error message says).
I'm on centos6.7 and i need to install snmptt to get all SNMP traps and log them into Nagios. I made it work yesterday, but today, not the same story...
I've run the yum install perl-Net-SNMP command, it told me that the package is already installed (from epel)
I've enabled the module on the snmptt.ini and now, when i'm trying to run it, I've a failed message :
root#SLINUX01:[~]$service snmptt restart
Stopping snmptt: [FAILED]
Starting snmptt: Can't locate SNMP.pm in #INC (#INC contains: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at (eval 12) line 1.
Could not load the Perl module SNMP! If net_snmp_perl_enable is
enabled then the SNMP module is required. Please see snmptt.html
for system requirements. Note: SNMPTT uses the Net-SNMP package's
SNMP module, NOT the CPAN Net::SNMP module!
died at /usr/sbin/snmptt line 426.
Suggestions ?
Found the solution : just install a different package :
yum install net-snmp-perl =/= yum install perl-Net-SNMP
The provided solution also worked for SNMPTT on Oracle Linux 7.5.
yum install net-snmp-perl
worked for me.
I'm trying to install Perl module MediaWiki::API using CPAN on OS X:
sudo cpan MediaWiki::API Password:
Reading '/Users/qazwsx/.cpan/Metadata'
Database was generated on Mon, 13 Jul 2015 20:53:32 GMT
Running install for module 'MediaWiki::API'
Running make for E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz
Checksum for /Users/qazwsx/.cpan/sources/authors/id/E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz ok
sh: /opt/local/bin/gzip: No such file or directory
Package seems to come without Makefile.PL.
(The test -f "/Users/qazwsx/.cpan/build/EXOBUZZ-iwzBiH/Makefile.PL" returned false.)
Writing one on our own (setting NAME to MediaWikiAPI)
CPAN.pm: Building E/EX/EXOBUZZ/MediaWiki-API-0.40.tar.gz
Writing Makefile for MediaWikiAPI
Writing MYMETA.yml and MYMETA.json
EXOBUZZ/MediaWiki-API-0.40.tar.gz
/usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
No tests defined for MediaWikiAPI extension.
EXOBUZZ/MediaWiki-API-0.40.tar.gz
/usr/bin/make test -- OK
Running make install
Appending installation info to /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level/perllocal.pod
EXOBUZZ/MediaWiki-API-0.40.tar.gz
/usr/bin/make install -- OK
This is a step of installing Git-Mediawiki (see https://github.com/moy/Git-Mediawiki/wiki/User-manual). However, after all the installation steps, the first git command reports that MediaWiki::API module isn't available:
git pull
Can't locate MediaWiki/API.pm in #INC (you may need to install the MediaWiki::API module) (#INC contains: /Users/qazwsx/WorkSpace-X4430/git/perl /Users/qazwsx/WorkSpace-X4430/git/contrib/mw-to-git /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/local/Cellar/git/2.4.1/libexec/git-core/git-remote-mediawiki line 15.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.4.1/libexec/git-core/git-remote-mediawiki line 15.
I wonder if my installation method for the Perl module is correct. One thing strikes out as odd is the error
sh: /opt/local/bin/gzip: No such file or directory
I use Homebrew with standard paths, so the gzip binary is at /usr/local/bin/gzip. But I don't know if or where to fix it. It appears to be some search paths issue but I don't know how to fix it.
There might be something wrong with your ~/.cpan, the configuration for CPAN. You can try
# Re-install cpan
brew doctor
brew update
brew install cpan
# Remove or back up ~/.cpan
mv ~/.cpan ~/.cpan.bak
# Re-initialize ~/.cpan
cpan config
# Try installing the Perl module again
sudo cpan install MediaWiki::API
I would like to install IO::Uncompress::Gunzip, so I do
perl -MCPAN -e shell
install CPAN
install IO::Uncompress::Gunzip
and I get
cpan[11]> install IO::Uncompress::Gunzip
Running install for module 'IO::Uncompress::Gunzip'
Running make for P/PM/PMQS/IO-Compress-2.046.tar.gz
Has already been unwrapped into directory /root/.cpan/build/IO-Compress-2.046-d_Y9xt
---- Unsatisfied dependencies detected during ----
---- PMQS/IO-Compress-2.046.tar.gz ----
Compress::Raw::Zlib [requires]
Compress::Raw::Bzip2 [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
...
Result: FAIL
Failed 78/86 test programs. 35/328 subtests failed.
make: *** [test_dynamic] Error 255
PMQS/IO-Compress-2.046.tar.gz
2 dependencies missing (Compress::Raw::Bzip2,Compress::Raw::Zlib); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports PMQS/IO-Compress-2.046.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
PMQS/IO-Compress-2.046.tar.gz : make_test NO 2 dependencies missing (Compress::Raw::Bzip2,Compress::Raw::Zlib); additionally test harness failed
See full error output at http://pastebin.com/nGc80C8Z
If I try to install Compress::Raw::Bzip2 and Compress::Raw::Zlib I get
cpan[12]> install Compress::Raw::Zlib
Running install for module 'Compress::Raw::Zlib'
Running make for P/PM/PMQS/Compress-Raw-Zlib-2.045.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Compress-Raw-Zlib-2.045-kBMzIh
Could not make: Unknown error
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
cpan[13]>
Question
Does anyone what these errors mean, and perhaps how I can install these modules?
First error I can spot is /bin/sh: gcc: command not found. It is trying to compile binary parts of the libraries and can't find your compiler. You probably need to install GCC.
A lot (if not all) of the subsequent errors are likely side effects of this.
This was helpful to me, but one additional step that wasn't mentioned here that I needed to perform to be able to install a module was to do a clean [MODULE] before retrying the install [MODULE].
Probably not needed to be mentioned for non-noobs to this environment, but I needed it.