I have been trying to install several perl modules on my brand new Opensuse installation, but to no avail. I have tried to install them both via CPAN, PPM and manually but keep incurring in the same error:
Unparsable version '' for prerequisite Test at Makefile.PL line 4.
nevertheless, Makefile.PL seems to be able to execute without problems, but the subsequent make execution incurrs into problems. This is the message causing the problem i think:
make: *** [LevenshteinXS.o] Error 127
JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz
/usr/bin/make -- NOT OK
i tried to do a whereis make and the result seems ok:
make: /usr/bin/make /usr/bin/X11/make /usr/share/man/man1/make.1.gz /usr/share/man/man1p/make.1p.gz
here's the complete recount of the actions that cpan carries on before telling me that the installation failed:
CPAN: Storable loaded ok (v2.34)
Reading '/home/tito/.cpan/Metadata'
Database was generated on Wed, 24 Oct 2012 19:07:03 GMT
Running install for module 'Text::LevenshteinXS'
Running make for J/JG/JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz
CPAN: Digest::SHA loaded ok (v5.71)
CPAN: Compress::Zlib loaded ok (v2.048)
Checksum for /home/tito/.cpan/sources/authors/id/J/JG/JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz ok
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.4404)
CPAN: CPAN::Meta loaded ok (v2.120630)
CPAN.pm: Building J/JG/JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz
Unparsable version '' for prerequisite Test at Makefile.PL line 4.
Checking if your kit is complete...
Looks good
Writing Makefile for Text::LevenshteinXS
Writing MYMETA.yml and MYMETA.json
CPAN: Module::CoreList loaded ok (v2.66)
cp LevenshteinXS.pm blib/lib/Text/LevenshteinXS.pm
AutoSplitting blib/lib/Text/LevenshteinXS.pm (blib/lib/auto/Text/LevenshteinXS)
/usr/bin/perl /usr/lib/perl5/5.16.0/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.16.0/ExtUtils/typemap LevenshteinXS.xs > LevenshteinXS.xsc && mv LevenshteinXS.xsc LevenshteinXS.c
Please specify prototyping behavior for LevenshteinXS.xs (see perlxs manual)
cc -c -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe -DVERSION=\"0.03\" -DXS_VERSION=\"0.03\" -fPIC "-I/usr/lib/perl5/5.16.0/x86_64-linux-thread-multi/CORE" LevenshteinXS.c
/bin/sh: cc: command not found
make: *** [LevenshteinXS.o] Error 127
JGOLDBERG/Text-LevenshteinXS-0.03.tar.gz
/usr/bin/make -- NOT OK
CPAN: YAML loaded ok (v0.84)
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
The warning about the version is just that, a warning. The real problem is this:
/bin/sh: cc: command not found
In other words: this module needs a C compiler and you don't have one. Not one Perl can find anyway. Installing the gcc package from OpenSuSE should solve that.
The "unparsable version" is from this line in the Makefile.PL.
'PREREQ_PM' => { Test },
PREREQ_PM indicates prerequisite modules and their minimum version. The author forgot the minimum version. No biggie, Test has come with Perl forever.
Related
I am trying to install the Perl package Vcf, which has a LOT of dependencies. One of these dependencies DB_File will not install.
con#VB:~$ cpanm DB_File
--> Working on DB_File
Fetching http://www.cpan.org/authors/id/P/PM/PMQS/DB_File-1.852.tar.gz ... OK
Configuring DB_File-1.852 ... OK
Building and testing DB_File-1.852 ... FAIL
! Installing DB_File failed. See /home/con/.cpanm/work/1567015698.27372/build.log for details. Retry with --force to force install it.
con#VB:~$ cat /home/con/.cpanm/work/1567015698.27372/build.log
cpanm (App::cpanminus) 1.7044 on perl 5.030000 built for x86_64-linux
Work directory is /home/con/.cpanm/work/1567015698.27372
You have make /usr/bin/make
You have LWP 6.39
You have /bin/tar: tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching DB_File () on cpanmetadb ...
--> Working on DB_File
Fetching http://www.cpan.org/authors/id/P/PM/PMQS/DB_File-1.852.tar.gz
-> OK
Unpacking DB_File-1.852.tar.gz
Entering DB_File-1.852
Checking configure dependencies from META.json
Configuring DB_File-1.852
Running Makefile.PL
Parsing config.in...
Looks Good.
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -ldb
Generating a Unix-style Makefile
Writing Makefile for DB_File
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.34)
Building and testing DB_File-1.852
cp DB_File.pm blib/lib/DB_File.pm
Running Mkbootstrap for DB_File ()
chmod 644 "DB_File.bs"
"/home/con/perl5/perlbrew/perls/perl-5.30.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- DB_File.bs blib/arch/auto/DB_File/DB_File.bs 644
cc -c -I/usr/local/BerkeleyDB/include -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"1.852\" -DXS_VERSION=\"1.852\" -fPIC "-I/home/con/perl5/perlbrew/perls/perl-5.30.0/lib/5.30.0/x86_64-linux/CORE" -D_NOT_CORE -DmDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t version.c
version.c:30:10: fatal error: db.h: No such file or directory
#include <db.h>
^~~~~~
compilation terminated.
Makefile:353: recipe for target 'version.o' failed
make: *** [version.o] Error 1
-> FAIL Installing DB_File failed. See /home/con/.cpanm/work/1567015698.27372/build.log for details. Retry with --force to force install it
You need the libdb development library installed on your machine before you can build DB_File — this probably comes from a package called libdb-dev or libdb-devel in your system package manager.
When I try to install Image::Magick via CPAN on an Ubuntu system, I get an 127 error. I have no idea what is going wrong. Below is the text of what I get:
cpan[1]> install Image::Magick
Reading '/root/.cpan/Metadata'
Database was generated on Fri, 15 Nov 2013 21:17:02 GMT
Running install for module 'Image::Magick'
Running make for J/JC/JCRISTY/PerlMagick-6.86.tar.gz
Checksum for /root/.cpan/sources/authors/id/J/JC/JCRISTY/PerlMagick-6.86.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
CPAN.pm: Building J/JC/JCRISTY/PerlMagick-6.86.tar.gz
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lMagickCore-6.Q16
Generating a Unix-style Makefile
Writing Makefile for Image::Magick
Writing MYMETA.yml and MYMETA.json
cp Magick.pm blib/lib/Image/Magick.pm
AutoSplitting blib/lib/Image/Magick.pm (blib/lib/auto/Image/Magick)
/usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap typemap Magick.xs > Magick.xsc && mv Magick.xsc Magick.c
cc -c -I/usr/local/include/ImageMagick-6 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"/usr/include/ImageMagick-6" -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/freetype2 -fopenmp -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -O2 -g -DVERSION=\"6.86\" -DXS_VERSION=\"6.86\" -fPIC "-I/usr/lib/perl/5.14/CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
/bin/sh: 1: cc: not found
make: *** [Magick.o] Error 127
JCRISTY/PerlMagick-6.86.tar.gz
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Failed during this command:
JCRISTY/PerlMagick-6.86.tar.gz : make NO
The error is here:
/bin/sh: 1: cc: not found
Try:
sudo apt-get install build-essential
before installing from CPAN.
Do you need the newest version? You should be able to get an only slightly older version with apt-get.
I think you should try installing ImageMagick for Perl on Ubuntuas per below, and not via Cpan:
sudo apt-get install perlmagick
This is really weird, can someone explain why GCC can not find an include file when installing XML::LibXML?
> cpan PAJAS/XML-LibXML-1.70.tar.gz
...
C:/CPANTE~1/PERL51~1.0_6/site/bin/gcc.exe -c -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -O2 -DVERSION=\"1.70\" -DXS_VERSION=\"1.70\" "-IC:\CPANTesters\Perl5.16.0_64\lib\CORE" -DHAVE_UTF8 -DHAVE_BLANK LibXML.c
LibXML.xs:34:31: fatal error: libxml/xmlversion.h: No such file or directory
> IF EXIST %INCLUDE%\libxml\xmlversion.h ECHO Cogito ergo sum
Cogito ergo sum
This is ActiveState 5.16.0 64 bit with MinGW64.
I decide to drop using Zlatkovic Win32 binaries ftp://ftp.zlatkovic.com/pub/libxml/, and use the 64 bit binaries available at http://ftp.gnome.org/pub/GNOME/binaries/win64/dependencies/.
The problem above is solved by going to the unpacked module and execute this command:
> perl Makefile.PL INC=-IC:\CPANTesters\bin\gnome-deps-win64\include LIBS=-LC:\CPANTesters\bin\gnome-deps-win64\lib
> dmake
But problem arises from running dmake test since Perl crashes on all test files.
C:\CPANTesters\Perl5.16.0_64\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/01basic.t ......................... Dubious, test returned 38 (wstat 9728, 0x2600)
Failed 3/3 subtests
Any idea on how to debug this?
XML-LibXML is a Perl binding for libxml2, but it does not include a copy of libxml2 (of which libxml/xmlversion.h is a part). You must install that separately, and make sure Perl and gcc can find it. INCLUDE is not an environment variable used by gcc. It uses CPATH or C_INCLUDE_PATH.
I contributed instructions for installing XML-LibXML from source on Microsoft Windows. Did you try following them?
The easiest way to get XML-LibXML on Windows is to install Strawberry Perl. It comes with XML-LibXML in the package.
Usually, on windows, the easiest thing is to use a repository that has built LibXML for you.
This question is similar to yours: Is XML::LibXML not supported on Perl 5.8.8?
try this, it worked for me on centos 6, after doing this I was able to install via CPANM other modules relying on XML::LibXML https://www.question-defense.com/2010/01/27/perl-cpan-install-xmllibxmlcommon-error-libxml2-not-found
I am having problems installed a CPAN module Text::CSV_XS using Cygwin.
I did a
$ cpan Text::CSV_XS
CPAN: Storable loaded ok (v2.20)
.... Every was good till:.....
Writing Makefile for Text::CSV_XS
cp CSV_XS.pm blib/lib/Text/CSV_XS.pm
/usr/bin/perl.exe /usr/lib/perl5/5.10/ExtUtils/xsubpp -typemap /usr/lib/perl5/5 .10/ExtUtils/typemap CSV_XS.xs > CSV_XS.xsc && mv CSV_XS.xsc CSV_XS.c
gcc-4 -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g3 -fno-strict-aliasing -p ipe -fstack-protector -I/usr/local/include -DUSEIMPORTLIB -O3 -DVERSION=\"0.8 8\" -DXS_VERSION=\"0.88\" "-I/usr/lib/perl5/5.10/i686-cygwin/CORE" CSV_XS.c
/bin/sh: gcc-4: command not found
Makefile:330: recipe for target `CSV_XS.o' failed
make: *** [CSV_XS.o] Error 127
HMBRAND/Text-CSV_XS-0.88.tgz
make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
I installed another module earlier, without problem.
Make is installed
gcc is installed
/bin/sh returns a new shell.
$ /bin/sh
$
Important note: as of this writing, gcc4 is now in the obsolete packages section which is hidden by default in the Cygwin installer.
Fire up the Cygwin packagre manager (setup.exe) and install gcc4. Use the search facility to locate the package in the manager. While you're at it, also install make, autoconf and automake. You'll find all these packages in the devel section.
Then retry, it will succeed, I just tested it:
MiLu#Dago: ~ > cpan Text::CSV_XS
...
Installing /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Text/CSV_XS/CSV_XS.bs
Installing /usr/lib/perl5/site_perl/5.10/i686-cygwin/auto/Text/CSV_XS/CSV_XS.dll
Installing /usr/lib/perl5/site_perl/5.10/i686-cygwin/Text/CSV_XS.pm
Installing /usr/share/man/man3/Text.CSV_XS.3pm
Appending installation info to /usr/lib/perl5/5.10/i686-cygwin/perllocal.pod
HMBRAND/Text-CSV_XS-0.88.tgz
/usr/bin/make install -- OK
I have a problem while installing Term::TermKey with CPAN and I can't find information about how to solve it. Here is an output:
cpan[9]> install Term::TermKey
Running install for module 'Term::TermKey'
Running Build for P/PE/PEVANS/Term-TermKey-0.10.tar.gz
Checksum was ok
'/usr/bin/perl Build.PL installdirs=site' returned status 256, won't make
Running Build test
Make had some problems, won't test
Running Build install
Make had some problems, won't install
May someone help me?
//edit
I installed libtermkey but I still have a problem:
Building Term-TermKey
cc -I/usr/lib/perl5/core_perl/CORE -DXS_VERSION="0.10" -DVERSION="0.10" -fPIC -I/usr/local/include -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -o lib/Term/TermKey.o lib/Term/TermKey.c
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Term/TermKey/TermKey.bs')
cc -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/local/lib -fstack-protector -o blib/arch/auto/Term/TermKey/TermKey.so lib/Term/TermKey.o -L/usr/local/lib -ltermkey
PEVANS/Term-TermKey-0.10.tar.gz
./Build -- OK
'YAML' not installed, will not store persistent state
Running Build test
t/00use.t ........... 1/1
# Failed test 'use Term::TermKey;'
# at t/00use.t line 8.
# Tried to use 'Term::TermKey'.
# Error: Can't load '/root/.cpan/build/Term-TermKey-0.10-Y5j3Oz/blib/arch/auto/Term/TermKey/TermKey.so' for module Term::TermKey: libtermkey.so.1: nie można otworzyć pliku obiektu dzielonego: Nie ma takiego pliku ani katalogu at /usr/lib/perl5/core_perl/DynaLoader.pm line 190.
It fails on every test. I don't know why. There is -L/usr/local/lib -ltermkey, so I've checked this directory:
ciembor#peace lib]$ ls | grep libtermkey
libtermkey.a
libtermkey.la
libtermkey.so
libtermkey.so.1
libtermkey.so.1.4.0
And all files are on their place...
Make sure that /usr/local/lib is also present in either $LD_LIBRARY_PATH or /etc/ld.so.conf. Without that, even if pkg-config can find the termkey.pc file which tells the compiler where the <termkey.h> files are, the (runtime) linker will not be able to link against the actual libtermkey.so file at runtime.
Alternatively, you could install libtermkey as a real package if your OS supports such - I keep a package on http://packages.leonerd.org.uk/ for Debian testing/unstable; it may also be suitable for other Debian-derived distributions such as Ubuntu.
When you install modules through CPAN, you don't see many of the error messages if the install fails. I would suggest to download Term-TermKey-0.10.tar.gz manually through http://search.cpan.org, extract it and then
perl Makefile.PL
make
make test
sudo make install
On my machine I'm told at the first step that I don't have libtermkey installed and it points me to a download.