I'm trying to install the SQL::Translator module. Everything runs fine until it gets to this test:
DBD::SQLite::db do failed: not an error at t/sqlite-rename-field.t line 62.
# Failed test '-- Convert schema '' to '':;'
# at t/sqlite-rename-field.t line 62.
# died: Died at t/sqlite-rename-field.t line 62.
# Looks like you failed 1 test of 16.
Failed 1/72 test programs. 1/1901 subtests failed.
make: *** [test_dynamic] Error 1
Any help is much appreciated, I was not able to find any similar questions. Thanks.
cpan link: http://search.cpan.org/~ilmari/SQL-Translator-0.11021/lib/SQL/Translator.pm
It could be because of missing dependencies and/or mismatch in version of other perl modules. Try using CPANM to install your desired package. It will take care of dependencies for you.
You can also try to install libsql-translator-perl library if you are on debian based systems. I am sure there will be a compatible library on red hat based systems too.
Also if you want to install from cpan then use CPANM to install the module.
Personally i prefer to use distro libraries in place of installing modules.
In case anyone stumbles across this question, my solution was:
install perlbrew
install latest version of perl via perlbrew
download required libraries
install module
It was much easier than dealing with the older system
Related
I tried to install Moose in perl 5.32.0 with the command cpan install Moose. The installation failed, with the following message:
Result: FAIL
Failed 448/478 test programs. 12/30 subtests failed.
Makefile:2047: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255
ETHER/Moose-2.2013.tar.gz
13 dependencies missing (Class::Load,Class::Load::XS,Data::OptList,Devel::OverloadInfo,Dist::CheckConflicts,Module::Runtime::Conflicts,Package::DeprecationManager,Package::Stash,Package::Stash::XS,Params::Util,Sub::Exporter,Sub::Identify,Test::CleanNamespaces); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports ETHER/Moose-2.2013.tar.gz
I tried the command cpan reports ETHER/Moose-2.2013.tar.gz, and somehow this installed Moose correctly. What happened here? What does cpan reports do exactly? Is this the same as App::cpanreports?
The error message there refers to something you can do in the CPAN.pm shell, and the cpan command doesn't have anything to map to that. Even if it did, it wouldn't look the same.
cpan with no arguments puts you into the CPAN.pm shell, and it's there that you can issue commands (such as install and whatnot). For reports, you need to install LWP and CPAN::Reporter first:
% cpan LWP CPAN::Reporter
...
% cpan
cpan[1]> reports ETHER/Moose-2.2013.tar.gz
Distribution: E/ET/ETHER/Moose-2.2013.tar.gz
Fetching 'http://www.cpantesters.org/show/Moose.json'...DONE
2.2013:
+PASS 5.28.0 on SunOS/Solaris 2.11 (i86pc-solaris-64)
+PASS 5.28.3 on GNU/Linux 5.4.34-0-lts (x86_64-linux-thread-multi)
+PASS 5.22.4 on GNU/Linux 5.4.0-26-generic (x86_64-linux)
+PASS 5.26.0 on FreeBSD 12.1-release (i386-freebsd-64int)
+PASS 5.26.0 on SunOS/Solaris 2.11 (i86pc-solaris-64)
However, it's probably easier to look on CPAN Testers to see the results for a particular module.
[You asked why using cpan reports ... instead of cpan install ... helped. This answers that. brian d foy's explains why cpan reports ... wasn't what you wanted to execute.]
It tries to install a module named reports.
The syntax for cpan is
cpan [options] <module_name> [<module_name> ...]
The operation is specified through options. The default operator is -i (install).
cpan install Moose
This command tries to install two distributions:
The newest one containing the module install.
A dummy module by this name was created, so this should not produce any errors.
Newer versions of cpan simply ignore this erroneous request.
The newest one containing the module Moose.
This is currently ETHER/Moose-2.2013.tar.gz.
cpan reports ETHER/Moose-2.2013.tar.gz
This command tries to install two distributions:
The newest one containing the module reports.
There's no module named reports, so that part fails.
>(error): Could not expand [reports]. Check the module name.
>(info): I can suggest names if you install one of Text::Levenshtein::XS, Text::Levenshtein::Damerau::XS, Text::Levenshtein, and Text::Levenshtein::Damerau::PP
>(info): and you provide the -x option on invocation.
>(error): Skipping reports because I couldn't find a matching namespace.
ETHER/Moose-2.2013.tar.gz
So,
cpan install Moose
is merely a bad way of writing
cpan Moose
Also,
cpan reports ETHER/Moose-2.2013.tar.gz
is merely a bad way of writing
cpan ETHER/Moose-2.2013.tar.gz
Currently, this should currently be equivalent to
cpan Moose
In other words, there's no difference between the command you claimed didn't work and the one you claimed worked.
I've a problem to install the aforementioned module via cpanm in my multi-threading version of Perl (not the original one).
I've Ubuntu 16.04.
When trying to compile and test this module it gives me the following error:
/usr/bin/ld: impossible to find -lz
collect2: error: ld returned 1 exit status
Makefile:494: instructions set for target "blib/arch/auto/Net/SSLeay/SSLeay.so" fail
make: *** [blib/arch/auto/Net/SSLeay/SSLeay.so] Error 1
-> FAIL Installing Net::SSLeay::Handle failed. See /home/my_name/.cpanm/work/1548275319.13675/build.log for details. Retry with --force to force install it.
openssl,ssllib-dev-perl,libnet-ssleay-perl, libcrypt-ssleay-perl already installed via apt-get.
I've also tried to compile manually this module, without success. I forced the installation too...no way.
The error seems linked with something missing in /usr/bin/ld: (impossible to find -lz collect2).
Is there anyone who can help me with this?
Cpanm has always worked pretty well. Up to now i've been able to get all my modules installed and well functioning, apart from Net::SSLeay::Handle.
Thanks in advace for your help
Ok, i solved by installing this packages (Ubuntu 16.04LTS):
-openssl
-libssl-dev
-libnet-ssleay-perl
-libcrypt-ssleay-perl
-zlib1g-dev as suggested above
Once you're done doing that, remember to avoid testing the module when gcc will be finishing compiling it, because in most cases it fails.
So the best incantation in doing this should be as follows:
-cpanm install -v --notest Net::SSLeay::Handle
Many thanks again to all Perl mates writing in this forum.
You saved the day
first log in cpan
sudo cpan
force intalling the module should work
force install Net::SSLeay::Handle
This should also install missing modules or notice it
I'm trying to run this script on my computer (MAC)
http://mkweb.bcgsc.ca/color-summarizer/?download
It's the first time in my life touching the terminal... so you understand that I ask very basic questions. please do forgive me...
basically when i execute the script, I would always get this kind of message :
Can't locate Imager/File/GIF.pm in #INC (you may need to install the
Imager::File::GIF module) (#INC contains:
/Applications/colorsummarizer/colorsummarizer-0.77/bin/lib
/Applications/colorsummarizer/colorsummarizer-0.77/bin/../lib
/Applications/colorsummarizer/colorsummarizer-0.77/bin
/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
/Library/Perl/5.18/darwin-thread-multi-2level/Imager.pm line 1677.
And so I use :
sudo cpan install Imager::File::GIF
for example. But the I get this :
Warning (mostly harmless): No library found for -lgif
GIF: Test code failed: Can't link/include 'gif_lib.h', 'stdio.h',
'errno.h', 'string.h', 'gif'
OS unsupported: GIF libraries or headers not found
Warning: No success on command[/usr/bin/perl Makefile.PL]
TONYC/Imager-File-GIF-0.91.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites
And ! it seems like even when I appear to install something successfully, The system ask me to re-install them again and again and again...
Maybe I did some very fundamental mistakes ?
Thanks a lot for your attention
The issue identified by the following message is not harmless at all, actually:
Warning (mostly harmless): No library found for -lgif
GIF: Test code failed: Can't link/include 'gif_lib.h', 'stdio.h',
'errno.h', 'string.h', 'gif'
The module uses libgif to do all the heavy work, but it's not installed. Furthermore, the installation procedure needs the library's header files.
Imager::File::GIF provides GIF file format support for Imager.
It requires libgif to be installed, including development headers.
For Linux distributions this typically requires installation of the
associated -dev or -devel package.
Installing the required library and header files might be as simple as asking your OS's package manager to install libgif-dev or libgif-devel.
Try to just install Imager like this, it might be all you need:
sudo cpan Imager
After that it could open gifs for me.
I don't know perl, I just needed POSIX as a dependency for a script. I have configured cpan answering the default questions and then, inside cpan,
install POSIX
I have been asked a million questions, answered default to all, and now the script is installing a million modules. Do I really need this ? I'm concerned if something goes wrong is it possible to undo this easily ?
UPDATE
well, what I feared just happened
Everything is up to date. Type '/usr/bin/make test' to run test suite.
./perl -Ilib installperl --destdir=
/usr/local/bin is not writable by you
make: ** [install-all] Erro 2
RJBS/perl-5.22.0.tar.bz2
/usr/bin/make install -- NOT OK
Failed during this command:
RJBS/perl-5.22.0.tar.bz2 : install NO
please, how can I fix this ?
POSIX is a core module included with Perl. You don't need to install it separately. Why don't you just install Perl via your package manager instead of from source?
It is obviosly some Perl extensions. Perl version is 5.8.8.
I found Error.pm, but now I'm looking for Core.pm.
While we're at it: how do you guys search for those modules. I tried Google, but that didn't help much. Thanks.
And finally, after I built everything, running:
./Build install
gives me:
Running make install-lib
/bin/ginstall -c -d /usr/lib/perl5/site_perl/5.8.8/i486-linux-thread-multi/Alien/SVN --prefix=/usr
/bin/ginstall: unrecognized option `--prefix=/usr'
Try `/bin/ginstall --help' for more information.
make: *** [install-fsmod-lib] Error 1
installing libs failed at inc/My/SVN/Builder.pm line 165.
Looks like Slackware's 'ginstall' really does not have that option. I think I'm going to Google a little bit now, to see how to get around this.
Base class package "Module::Build" is empty.
(Perhaps you need to 'use' the module which defines that package first.)
at inc/My/SVN/Builder.pm line 5
BEGIN failed--compilation aborted at inc/My/SVN/Builder.pm line 5.
Compilation failed in require at Build.PL line 6.
BEGIN failed--compilation aborted at Build.PL line 6.
is a (rather poor) way of asking you to install Module::Build.
Once you do that, it's
perl Build.PL
./Build
./Build test
./Build install
how do you guys search for those modules
http://search.cpan.org/
now I'm looking for Core.pm
That’s SVN::Core, which is a bit of a problem. Try installing Alien::SVN from CPAN. That worked for me on my freshly installed Slackware 12.0 on my laptop, but I have yet to get it to install on my workstation.
It should be compatible. The CPAN Tester's matrix shows no failures for Perl 5.8.8 on any platform.
Per the README, you can install it by doing:
perl Makefile.pl
make
make test
make install
I'm guessing you're running on Slackware so the cpan command is what you want to be using to install any Perl modules. It will pull in all dependencies for you. If you're running it for the first time it will have to do some cofiguration, but newer versions of cpan will ask if you want it to automatically configure it.
$ sudo cpan
cpan> install Alien::SVN
Additionally, if there's a package management application for Slackware, you should try that first to install new Perl modules.
https://metacpan.org/ is your first port of call for Perl modules.
What do you mean by "does not seem to be compatible"? Can you post the error message?
If the latest version does not work, you can select an older version in the "other releases" drop down and download that.
Edit: to those reading this, the author updated the question, so my answer seems a bit out of left field :)
The place to search is http://search.cpan.org.
I have my browser (Firefox) set up so that I can type "cpan foo" in the address bar and it will search CPAN for modules matching "foo." You can do this with either a keyword bookmark or by assigning a keyword to a search plugin.