Why does CPAN install fail when installing Scrappy? - perl

I understand that it is missing dependencies but I thought that CPAN would install all the dependant modules automatically. Here is the error:
Test Summary Report
-------------------
t/00_load_scrappy.t (Wstat: 65280 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: Bad plan. You planned 12 tests but ran 1.
t/00_test_function_back.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_content.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_control.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_cookies.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_crawl.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_debug.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_domain.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/00_test_function_download.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/01_load_scrappy.t (Wstat: 65280 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: Bad plan. You planned 8 tests but ran 1.
Files=39, Tests=2, 1 wallclock secs ( 0.08 usr 0.08 sys + 0.85 cusr 0.15 csys = 1.16 CPU)
Result: FAIL
Failed 10/39 test programs. 2/2 subtests failed.
make: *** [test_dynamic] Error 255
AWNCORP/Scrappy-0.94112090.tar.gz
7 dependencies missing (String::TT,WWW::Mechanize,Web::Scraper,YAML::Syck,Template,HTML::TreeBuilder,Moose); additionally test harness failed
make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports AWNCORP/Scrappy-0.94112090.tar.gz
Running make install
make test had returned bad status, won't install without force
Could not read metadata file. Falling back to other methods to determine prerequisites
Failed during this command:
ROBIN/PadWalker-1.96.tar.gz : make NO
ABW/Template-Toolkit-2.24.tar.gz : make NO
BOBTFISH/String-TT-0.03.tar.gz : make_test NO 2 dependencies missing (PadWalker,Template); additionally test harness failed
GAAS/HTML-Parser-3.69.tar.gz : make NO
CJM/HTML-Tree-5.03.tar.gz : make_test NO 2 dependencies missing (HTML::Parser,HTML::Entities); additionally test harness failed
MIROD/HTML-TreeBuilder-XPath-0.14.tar.gz : make_test NO one dependency not OK (HTML::TreeBuilder); additionally test harness failed
GAAS/libwww-perl-6.04.tar.gz : make_test NO 2 dependencies missing (HTML::HeadParser,HTML::Entities); additionally test harness failed
MIYAGAWA/Web-Scraper-0.36.tar.gz : make_test NO 4 dependencies missing (HTML::TreeBuilder::XPath,HTML::Entities,HTML::TreeBuilder,LWP); additionally test harness failed
DOY/Package-Stash-XS-0.25.tar.gz : make NO
DROLSKY/Class-Load-XS-0.04.tar.gz : make NO
DOY/Moose-2.0604.tar.gz : make NO
GAAS/HTML-Form-6.03.tar.gz : make_test NO one dependency not OK (HTML::TokeParser); additionally test harness failed
JESSE/WWW-Mechanize-1.72.tar.gz : make_test NO 7 dependencies missing (HTML::Form,LWP::UserAgent,HTML::TokeParser,HTML::Parser,HTML::HeadParser,HTML::TreeBuilder,LWP); additionally test harness failed
TODDR/YAML-Syck-1.21.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 512
AWNCORP/Scrappy-0.94112090.tar.gz : make_test NO 7 dependencies missing (String::TT,WWW::Mechanize,Web::Scraper,YAML::Syck,Template,HTML::TreeBuilder,Moose); additionally test harness failed
Then I tried to install one of the dependant modules alone:
cpan[2]> install PadWalker
Running install for module 'PadWalker'
Running make for R/RO/ROBIN/PadWalker-1.96.tar.gz
Has already been unwrapped into directory /root/.cpan/build/PadWalker-1.96-n6C9km
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
Could someone point me in the right direction? I am root and it is Ubuntu 12.04.1 up to date as of now.

It is possible to install Scrappy with CPAN. In my case only Moose had to be forced (Failed 1/382 test programs. 0/18150 subtests failed).
cpan[6]> force install Moose
[...]
cpan[7]> install Scrappy
Running install for module 'Scrappy'
Running make for A/AW/AWNCORP/Scrappy-0.94112090.tar.gz
[...]
Installing /home/david/perl5/bin/scrappy
Appending installation info to /home/david/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod
AWNCORP/Scrappy-0.94112090.tar.gz
/usr/bin/make install -- OK
You should try to install PadWalker manually to find out what is the reason behind Could not make: Unknown error.
In my case PadWalker could be installed from ~/.cpan/build/PadWalker-1.96-XW0Mq2 as follow:
perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for PadWalker
Writing MYMETA.yml
make
cp PadWalker.pm blib/lib/PadWalker.pm
/usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp -typemap /usr/share/perl/5.14/ExtUtils/typemap PadWalker.xs > PadWalker.xsc && mv PadWalker.xsc PadWalker.c
cc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"1.96\" -DXS_VERSION=\"1.96\" -fPIC "-I/usr/lib/perl/5.14/CORE" PadWalker.c
[...]
chmod 755 blib/arch/auto/PadWalker/PadWalker.so
cp PadWalker.bs blib/arch/auto/PadWalker/PadWalker.bs
chmod 644 blib/arch/auto/PadWalker/PadWalker.bs
Manifying blib/man3/PadWalker.3pm
make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/closure.t ... ok
t/dm.t ........ ok
[...]
Result: PASS
make install
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /home/david/perl5/man/man3/PadWalker.3pm
Appending installation info to /home/david/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/perllocal.pod

Related

CPAN dmake.exe: Error code 255, while making 'test_dynamic'

I start using Strawberry Perl and wanted to install some modules using the cpan command. But i receive the error message "Error code 255, while making 'test_dynamic'".
First i tried to install WWW::Mechanize::Firefox finding that i miss three other module: MozRepl::RemoteObject 0.39; Object::Import and Shell::Command. The first two of those 3 give the same error message. The Shell::Command installed whitout any error message.
MozRepl::RemoteObject 0.39:
Test Summary Report
-------------------
t/10-plugin-repl-enter.t (Wstat: 512 Tests: 3 Failed: 2)
Failed tests: 2-3
Non-zero exit status: 2
t/16-plugin-repl-home.t (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
t/18-plugin-repl-util-help_url_for.t (Wstat: 768 Tests: 4 Failed: 3)
Failed tests: 2-4
Non-zero exit status: 3
t/19-plugin-repl-util-doc_for.t (Wstat: 768 Tests: 7 Failed: 3)
Failed tests: 2-3, 5
Non-zero exit status: 3
t/20-plugin-json.t (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
Files=14, Tests=58, 6 wallclock secs ( 0.01 usr + 0.05 sys = 0.06 CPU)
Result: FAIL
Failed 5/14 test programs. 10/58 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
ZIGOROU/MozRepl-0.06.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports ZIGOROU/MozRepl-0.06.tar.gz
Stopping: 'test' failed for 'MozRepl'.
Object::Import
Test Summary Report
-------------------
t/04_handle.t (Wstat: 65280 Tests: 3 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 56 tests but ran 3.
Files=14, Tests=265, 3 wallclock secs ( 0.09 usr + 0.06 sys = 0.16 CPU)
Result: FAIL
Failed 1/14 test programs. 0/265 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
AMBRUS/Object-Import-1.004.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports AMBRUS/Object-Import-1.004.tar.gz
Stopping: 'install' failed for 'Object::Import'.
Failed during this command:
AMBRUS/Object-Import-1.004.tar.gz : make_test NO
I'm not a Perl programmer, just startet.
/edit: the other question is about another package. I read the cpantesters page and the packages should be OK. But could it be that there is something whit the 64-bit version. On the cpantesters site are all windows related entries are for win32:
http://www.cpantesters.org/distro/O/Object-Import.html#Object-Import-1.004
http://www.cpantesters.org/distro/M/MozRepl-RemoteObject.html#MozRepl-RemoteObject-0.39
/edit2: Tried to get some reports and run both installs again, now it looks like the MozRepl::RemoteObject went good, but the Object::Import didn't: So here is the error report from that:
Running install for module 'Object::Import'
Checksum for C:\STRAWB~1\cpan\sources\authors\id\A\AM\AMBRUS\Object-Import-1.004.tar.gz ok
Scanning cache C:\STRAWB~1\cpan\build for sizes
............................................................................DONE
Configuring A/AM/AMBRUS/Object-Import-1.004.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Object::Import
Writing MYMETA.yml and MYMETA.json
AMBRUS/Object-Import-1.004.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for A/AM/AMBRUS/Object-Import-1.004.tar.gz
cp lib/Object/Import.pm blib\lib\Object\Import.pm
AMBRUS/Object-Import-1.004.tar.gz
C:\STRAWB~1\c\bin\dmake.exe -- OK
Running make test
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00_require.t ... ok
t/01_basic.t ..... ok
t/02_auto.t ...... ok
t/03_bigint.t .... ok
t/04_handle.t ....
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 53/56 subtests
t/05_nometh.t .... ok
t/06_deref.t ..... ok
t/07_mary.t ...... ok
t/08_target.t .... ok
t/09_parm.t ...... ok
t/10_alias.t ..... ok
t/11_exporter.t .. ok
t/12_taint.t ..... ok
t/13_meta.t ...... ok
Test Summary Report
-------------------
t/04_handle.t (Wstat: 65280 Tests: 3 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 56 tests but ran 3.
Files=14, Tests=265, 3 wallclock secs ( 0.09 usr + 0.06 sys = 0.16 CPU)
Result: FAIL
AMBRUS/Object-Import-1.004.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports AMBRUS/Object-Import-1.004.tar.gz
Stopping: 'install' failed for 'Object::Import'.

Win32-SerialPort installation error

When tried to install Win32-SerialPort in windows command prompt getting the following error, using activeperl 5.24.1 build(2402)64 bit, could anyone tell were it went wrong and the ways to insatll win32::SerialPort, I have both strawberry and active perl installed
cmd> perl -MCPAN -e shell
cpan> install Win32::SerialPort
Database was generated on Thu, 09 Mar 2017 12:01:53 GMT
Running install for module 'Win32::SerialPort'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/B/BB/BBIRTH/CHECKSUMS
Checksum for C:\STRAWB~1\cpan\sources\authors\id\B\BB\BBIRTH\Win32-SerialPort-0.22.tar.gz ok
Scanning cache C:\STRAWB~1\cpan\build for sizes
............................................................................DONE
Configuring B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz with Makefile.PL
Can't spawn "cmd.exe": No such file or directory at Makefile.PL line 35.
Device COM1 does not appear to exist. Testing impossible
No 'Makefile' created BBIRTH/Win32-SerialPort-0.22.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Win32::SerialPort'.
Failed during this command:
BBIRTH/Win32-SerialPort-0.22.tar.gz : writemakefile NO -- No 'Makefile' created
EDIT:
After suggestion from Jens I have set the path to set PATH=%PATH%;C:\windows\system32
Thanks for the suggestion "cmd.exe" error vanished but
shows up with the following error now, any solutions?
Test Summary Report
-------------------
t/test1.t (Wstat: 256 Tests: 309 Failed: 1)
Failed test: 157
Non-zero exit status: 1
t/test2.t (Wstat: 256 Tests: 146 Failed: 1)
Failed test: 27
Non-zero exit status: 1
t/test3.t (Wstat: 256 Tests: 264 Failed: 1)
Failed test: 149
Non-zero exit status: 1
t/test4.t (Wstat: 256 Tests: 518 Failed: 1)
Failed test: 366
Non-zero exit status: 1
t/test7.t (Wstat: 512 Tests: 90 Failed: 2)
Failed tests: 21-22
Non-zero exit status: 2
Files=7, Tests=1808, 6 wallclock secs ( 0.27 usr + 0.05 sys = 0.31 CPU)
Result: FAIL
Failed 5/7 test programs. 6/1808 subtests failed.
dmake.exe: Error code 130, while making 'test_dynamic'
BBIRTH/Win32-SerialPort-0.22.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports BBIRTH/Win32-SerialPort-0.22.tar.gz
Also I am using both Activeperl and strwaberry perl will that be a problem?
Strawberry Perl Version > 5.32:
This problem should be resolved on Strawberry Perl 5.32, Win32::SerialPort module will be installed by default.
Strawberry Perl Version < 5.32:
Here is a solution if you need to install Win32::SerialPort module but the Strawberry Perl < 5.32:
Download the module tar ball:
http://cpan.strawberryperl.com/authors/id/B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz
unzip and you will get this folder:
Modified the Makefile.PL to comment out all "COM1" section:
using cmd:
cd Win32-SerialPort-0.22
perl Makefile.PL
dmake
dmake install
Enjoy it!!

Error while installing WWW::Selenium through CPAN

I have installed ActivePerl PPM and Strawberry Perl(Padre). Tried installing WWW::Selenium CPAN from command prompt through
perl -MCPAN -e shell
install WWW::Selenium
It throws the following error
Test Summary Report
-------------------
t/test_default_server.t (Wstat: 65280 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: Bad plan. You planned 7 tests but ran 1.
Files=12, Tests=344, 31 wallclock secs ( 0.14 usr + 0.06 sys = 0.20 CPU)
Result: FAIL
Failed 1/12 test programs. 1/344 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
MATTP/Test-WWW-Selenium-1.36.tar.gz
C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MATTP/Test-WWW-Selenium-1.36.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
MATTP/Test-WWW-Selenium-1.36.tar.gz : make_test NO
Also I have installed Selenium stand alone server (a jar file). But the following code doesn't work in command prompt.
java -jar <path of the selenium server>
P.S: I don't know Perl. I'm a beginner.

Installing GD library for perl on MacOSX 10.6

I have been trying to install GD library for perl to no avail a long while now. I've tried every little thing I could find on the internets but nothing. I am trying to get Circos graphs which require the GD package.
When I try to install it through CPAN it gives me this error:
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD.t ........ 1/12 Can't load './blib/arch/auto/GD/GD.bundle' for module GD: dlopen(./blib/arch/auto/GD/GD.bundle, 2): Symbol not found: _jpeg_resync_to_restart
Referenced from: /usr/lib/libgd.2.dylib
Expected in: flat namespace
in /usr/lib/libgd.2.dylib at /opt/local/lib/perl5/5.14.1/darwin-multi-2level/DynaLoader.pm line 194.
at t/GD.t line 14
Compilation failed in require at t/GD.t line 14.
BEGIN failed--compilation aborted at t/GD.t line 14.
t/GD.t ........ Dubious, test returned 2 (wstat 512, 0x200)
Failed 12/12 subtests
t/Polyline.t .. Can't load '/Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/arch/auto/GD/GD.bundle' for module GD: dlopen(/Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/arch/auto/GD/GD.bundle, 2): Symbol not found: _jpeg_resync_to_restart
Referenced from: /usr/lib/libgd.2.dylib
Expected in: flat namespace
in /usr/lib/libgd.2.dylib at /opt/local/lib/perl5/5.14.1/darwin-multi-2level/DynaLoader.pm line 194.
at /Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/lib/GD/Polyline.pm line 45
Compilation failed in require at /Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/lib/GD/Polyline.pm line 45.
BEGIN failed--compilation aborted at /Users/zehira/.cpan/build/GD-2.46-mp3nuO/blib/lib/GD/Polyline.pm line 45.
Compilation failed in require at t/Polyline.t line 10.
BEGIN failed--compilation aborted at t/Polyline.t line 10.
t/Polyline.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/1 subtests
Test Summary Report
-------------------
t/GD.t (Wstat: 512 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 2
Parse errors: Bad plan. You planned 12 tests but ran 1.
t/Polyline.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 1 tests but ran 0.
Files=2, Tests=1, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.04 cusr 0.01 csys = 0.08 CPU)
Result: FAIL
Failed 2/2 test programs. 1/1 subtests failed.
make: *** [test_dynamic] Error 2
LDS/GD-2.46.tar.gz
make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports LDS/GD-2.46.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
LDS/GD-2.46.tar.gz : make_test NO
I tried to reinstall jpeg libraries with --enable-shared --enable-static options but didn't help either. I also installed a MacPorts version of perl thinking I might have messed up the perl installation that comes with my mac. Anyone have any idea why this might be happening?
(yes, I'm relatively new to the world of terminal and all this and am still trying to navigate my way around)
Thanks!
I have solved this issue using homebrew to install libgd first, and then cpan. It worked perfectly.
brew install libgd
cpan install GD
i installed it step by step without any problem by
http://zientzilaria.herokuapp.com/blog/2012/06/03/installing-circos-on-os-x/
maybe that helps...
Firstly I'm also a circos user :) It's really not simple to install circos on win/linux/mac for perl and the modules circos needs .
Above my practice you'd better do like this from very begin:
install perl (choose the very popular new version)
install circos (ref http://circos.ca/software/installation/)
install the modules circos needs but exclude GD : this is easy, just download and copy, or install by CPAN (ref http://www.rcbowen.com/imho/perl/modules.html)
install GD : GD is a special module (not platform independently ), and you should build it on your OS and then install : http://www.sharedproteomics.com/forum/showthread.php?325-Installing-GD-on-Mac-OSX-10.6
It looks like your problem is at step3 !!! If Google can not help you to make it, another way to request help is using circos's google group: http://groups.google.com/group/circos-data-visualization there Martin and other circos users will help you directly.
For prerequisite of Circos installation, the documentation from CircosAPI is very helpful. It was written for OSX 10.8, and still works for OS X Yosemiteā€ˇ.
http://kylase.github.io/CircosAPI/os-x-installation-guide/
You need libgd. If you are using ubuntu & you can get it using
sudo apt-get install libgd-gd2-perl
Then you can follow the normal procedure as mentioned in circos installation instructions.

Error installing Perl CGI module from cpan

I get the following results when doing cpan install CGI on Ubuntu 10.4.
Test Summary Report
-------------------
t/tmpdir.t (Wstat: 0 Tests: 9 Failed: 0)
TODO passed: 3, 6, 8
t/url.t (Wstat: 65280 Tests: 0 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
Files=39, Tests=695, 2 wallclock secs ( 0.45 usr 0.11 sys + 1.19 cusr 0.21 csys = 1.96 CPU)
Result: FAIL
Failed 1/39 test programs. 0/695 subtests failed.
make: *** [test_dynamic] Error 255
MARKSTOS/CGI.pm-3.55.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MARKSTOS/CGI.pm-3.55.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
MARKSTOS/CGI.pm-3.55.tar.gz : make_test NO
And cpan force install also create same results. Has anyone had this error, does anyone know how to fix it?
Don't install modules from CPAN if you have a packet manager. This may cause problems with update or with other modules.
Just use:
apt-get install libcgi-pm-perl
OR, if you can't find the package with needed module, you must make a package first ( you need to install dh-make-perl package for that)
sample of creating debian/ubuntu package:
wget http://search.cpan.org/CPAN/authors/id/M/MA/MARKSTOS/CGI.pm-3.63.tar.gz
tar -xvpf CGI.pm-3.63.tar.gz
cd CGI.pm-3.63/
dh-make-perl
debian/rules binary
and install it with
sudo dpkg -i packagename.deb