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.
Related
I'm trying to install XML::Simple under Perlbrew but am hitting an error that seems like it requires root access to fix. However, the whole purpose of using perlbrew (or one of them, at least) is to disassociate your perl environment from the OS installed perl version.
I've installed perlbrew (5.10.1, legacy code requirement) and several modules. It is currently functioning as expected. However, I get an error when trying to install XML::Simple.
$ cpanm XML::Simple
--> Working on XML::Simple
Fetching http://www.cpan.org/authors/id/G/GR/GRANTM/XML-Simple-2.25.tar.gz ... OK
Configuring XML-Simple-2.25 ... OK
==> Found dependencies: XML::SAX::Expat
--> Working on XML::SAX::Expat
Fetching http://www.cpan.org/authors/id/B/BJ/BJOERN/XML-SAX-Expat-0.51.tar.gz ... OK
Configuring XML-SAX-Expat-0.51 ... OK
==> Found dependencies: XML::Parser
--> Working on XML::Parser
Fetching http://www.cpan.org/authors/id/T/TO/TODDR/XML-Parser-2.44.tar.gz ... OK
Configuring XML-Parser-2.44 ... OK
Building and testing XML-Parser-2.44 ... FAIL
! Installing XML::Parser failed. See /home/user1/.cpanm/work/1532923694.18203/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'XML::Parser' is not installed
! Bailing out the installation for XML-SAX-Expat-0.51.
! Installing the dependencies failed: Module 'XML::SAX::Expat' is not installed
! Bailing out the installation for XML-Simple-2.25.
$
Here's the output of the log file (cut down to the pertinent part):
cp Expat.pm ../blib/lib/XML/Parser/Expat.pm
Running Mkbootstrap for Expat ()
chmod 644 "Expat.bs"
"/home/user1/perl5/perlbrew/perls/perl-5.10.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Expat.bs ../blib/arch/auto/XML/Parser/Expat/Expat.bs 644
"/home/user1/perl5/perlbrew/perls/perl-5.10.1/bin/perl" "/home/user1/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/ExtUtils/xsubpp" -noprototypes -typemap '/home/user1/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/ExtUtils/typemap' -typemap /home/user1/.cpanm/work/1532923694.18203/XML-Parser-2.44/Expat/typemap' Expat.xs > Expat.xsc
mv Expat.xsc Expat.c
cc -c -m32 -march=i686 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"2.44\" -DXS_VERSION=\"2.44\" -fPIC "-I/home/user1/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/x86_64-linux/CORE" Expat.c
Expat.xs:12:19: fatal error: expat.h: No such file or directory
#include <expat.h>
^
compilation terminated.
make[1]: *** [Expat.o] Error 1
make[1]: Leaving directory `/home/user1/.cpanm/work/1532923694.18203/XML-Parser-2.44/Expat'
make: *** [subdirs] Error 2
-> FAIL Installing XML::Parser failed. See /home/user1/.cpanm/work/1532923694.18203/build.log for details. Retry with --force to force install it.
-> FAIL Installing the dependencies failed: Module 'XML::Parser' is not installed
-> FAIL Bailing out the installation for XML-SAX-Expat-0.51.
-> FAIL Installing the dependencies failed: Module 'XML::SAX::Expat' is not installed
-> FAIL Bailing out the installation for XML-Simple-2.25.
~
I have tried installing expat locally via:
wget https://sourceforge.net/projects/expat/files/expat/2.2.4/expat-2.2.4.tar.bz2
tar xjf expat-2.2.4.tar.bz2
cd expat-2.2.4
./configure --prefix=/home/user1/perl5/perlbrew/perls/perl-5.10.1/
make
make install
I've verified that expat.h is in ~/perl5/perlbrew/perls/perl-5.10.1/include. I updated my path to include that location.
Every fix I see is to install expat via the operating system tools (for the various flavors).
The issue is that I don't have root access and while I can technically ask the admin to install it, my project requires a solution that doesn't require root access as it will be copied through multiple environments and servers.
Is there a way to install XML::Simple without expat? Or a way to install expat in perlbrew such that XML::Simple will find it and use it?
Install XML::Parser manually and tell ExtUtils::MakeMaker where to find the C libraries. See INC and LIBS.
cpanm --look XML::Parser
PERLPREFIX=/home/user1/perl5/perlbrew/perls/perl-5.10.1/
perl Makefile.PL INC=-I$PERLPREFIX/include LIBS=-L$PERLPREFIX/lib
make && make test && make install
If you use cpan instead of cpanm, you can make this hands-off and permanent. Set the option makepl_arg, e.g. by running at the CPAN shell prompt):
o conf makepl_arg "INC=-I/home/user1/perl5/perlbrew/perls/perl-5.10.1/include LIBS=-L/home/user1/perl5/perlbrew/perls/perl-5.10.1/lib"
o conf commit
P.S. expat 2.2.5 is out
I am installing Perl module XML::LibXSLT, and I am getting the errors shown below.
Writing Makefile for XML::LibXSLT
Writing MYMETA.yml and MYMETA.json
cp LibXSLT.pm blib\lib\XML\LibXSLT.pm
E:\Perl\bin\perl.exe E:\Perl\lib\ExtUtils\xsubpp -typemap E:\Perl\lib\ExtUtils\
typemap -typemap typemap LibXSLT.xs > LibXSLT.xsc && E:\Perl\bin\perl.exe -MExt
Utils::Command -e mv -- LibXSLT.xsc LibXSLT.c
E:\Perl\site\bin\gcc.exe -c -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64
-DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTE
XT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DHASATTRIBUTE -fno-strict-aliasing -mms-bit
fields -O2 -DVERSION=\"1.81\" -DXS_VERSION=\"1.81\" "-IE:\Perl\lib\CO
RE" -DHAVE_BLANK -DHAVE_BLANK -DHAVE_EXSLT LibXSLT.c
LibXSLT.xs:12:32: fatal error: libxslt/xsltconfig.h: No such file or directory
compilation terminated.
dmake.exe: Error code 129, while making 'LibXSLT.o'
SHLOMIF/XML-LibXSLT-1.81.tar.gz
E:\Perl\site\bin\dmake.exe -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
Any idea to how to rectify this. Please let me know.
Actaully, I am installing this by using
perl -MCPAN -e "CPAN::Shell->force(qw(install XML::LibXSLT));
So, it is getting 'XML-LibXSLT-1.81.tar.gz' automatically and working this with Windows 7.
It would help if you said how you were trying to install the module. Is this cpan or cpanm, or are you doing it manually? It also looks like you're building on a Windows system, is that right?
The immediate problem is that the gcc compiler can't find libxslt/xsltconfig.h. It may be that the download wasn't unpacked correctly, but I see you are trying to build version 1.81 when the latest is 1.82. You should really fetch the latest version before you try to build it.
Sounds like you're missing the headers files for libxslt. Did you install libxslt?
XML::LibXSLT's README:
This module is a fast XSLT library, based on the GNOME libxslt engine
that you can find at http://www.xmlsoft.org/XSLT/
...
A NOTE ON INSTALLATION
The library depends on libxslt. You have to have both the library and
its header files installed (on various Linux/UNIX distributions thay
are usually packaged as libxslt-dev or libxslt-devel). The module can
further make use of libexslt, which is distributed with libxslt, but
on some systems packaged separately. These libraries may have their
own dependencies (usually resolved automatically by the packaging
system).
...
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
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.
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