Perl cpan: error installing DateTime, CHECKSUM download failure - perl

I am running Perl 5.10 on a shared Red Hat Linux 6.2 server. I have asked the root user of the machine to install the Perl DateTime module for me, using the following commands:
perl -MCPAN -e shell
cpan> install DateTime
We were able to successfully install other Perl modules such as Text::CSV before.
But the following error occurred while installing DateTime. Here is the last bits of error log:
Question: It looks like the error might be complaining about not being able to fetch the CHECKSUM file from ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS. However, I have no problem browsing to this exact file from my Internet Explorer. Can someone suggest ways to workaround this? Thanks.
Trying with "/usr/bin/wget -O /root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173" to get
"ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz"
--2013-06-20 09:30:06-- ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz
=> b/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173b
Resolving ftp.perl.org... 203.178.137.175, 163.143.1.21 Connecting to ftp.perl.org|203.178.137.175|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/CPAN/authors/id/R/RJ/RJBS ... done.
==> SIZE CHECKSUMS.gz ... done.
==> PASV ... done. ==> RETR CHECKSUMS.gz ...
No such file bCHECKSUMS.gzb.
Warning: no success downloading '/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173'. Giving up on it. at /usr/share/perl5/CPAN/Distribution.pm line
1311
As a last resort we now switch to the external ftp command '/usr/kerberos/bin/ftp'
to get '/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp12173'.
Doing so often leads to problems that are hard to diagnose.
If you're the victim of such problems, please consider unsetting the ftp config variable with
o conf ftp ""
o conf commit
Issuing "/usr/kerberos/bin/ftp -n"
Trying with external ftp to get
ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS
Going to send the dialog
open ftp.perl.org
user anonymous Red Hat, Inc.#localhost.localdomain
lcd /root/.cpan/sources/authors/id/R/RJ/RJBS
cd /
cd pub
cd CPAN
cd authors
cd id
cd R
cd RJ
cd RJBS
bin
get CHECKSUMS CHECKSUMS.tmp12173
quit
Not connected.
Local directory now /root/.cpan/sources/authors/id/R/RJ/RJBS
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Bad luck... Still failed!
Can't access URL ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.
Your urllist is empty! The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'
Could not fetch authors/id/R/RJ/RJBS/CHECKSUMS
UPDATE1:
We also tried the o conf ftp "" and o conf commit commands, but we still had an error.
Trying with "/usr/bin/wget -O /root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp16529" to get
"http://www.perl.org/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz"
--2013-06-20 13:52:07-- http://www.perl.org/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS.gz
Resolving www.perl.org... 207.171.7.41, 207.171.7.51 Connecting to www.perl.org|207.171.7.41|:80... failed: Connection refused.
Connecting to www.perl.org|207.171.7.51|:80... failed: Connection refused.
Warning: no success downloading '/root/.cpan/sources/authors/id/R/RJ/RJBS/CHECKSUMS.tmp16529'. Giving up on it. at /usr/share/perl5/CPAN/Distribution.pm line
1311
Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/authors/id/R/RJ/RJBS/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/R/RJ/RJBS/Test-Fatal-0.010.tar.gz ok Test-Fatal-0.010 Test-Fatal-0.010/README Test-Fatal-0.010/Changes Test-Fatal-0.010/LICENSE Test-Fatal-0.010/dist.ini Test-Fatal-0.010/META.yml Test-Fatal-0.010/MANIFEST Test-Fatal-0.010/t Test-Fatal-0.010/t/basic.t Test-Fatal-0.010/META.json Test-Fatal-0.010/Makefile.PL Test-Fatal-0.010/lib/Test Test-Fatal-0.010/lib/Test/Fatal.pm
Test-Fatal-0.010/t/like-exception.t
Test-Fatal-0.010/t/release-pod-syntax.t
CPAN.pm: Going to build R/RJ/RJBS/Test-Fatal-0.010.tar.gz
Checking if your kit is complete...
Looks good
Warning: prerequisite Try::Tiny 0.07 not found.
Writing Makefile for Test::Fatal
Could not read '/root/.cpan/build/Test-Fatal-0.010-GNYnPy/META.yml'. Falling back to other methods to determine prerequisites
---- Unsatisfied dependencies detected during ----
---- RJBS/Test-Fatal-0.010.tar.gz ----
Try::Tiny [requires]
Shall I follow them and prepend them to the queue of modules we are processing right now? [yes] Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
Running install for module 'Try::Tiny'
'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/root/.cpan/prefs'
Running make for D/DO/DOY/Try-Tiny-0.12.tar.gz Fetching with LWP:
http://www.perl.org/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.12.tar.gz
LWP failed with code[500] message[Can't connect to www.perl.org:80 (connect: Connection refused)] Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.12.tar.gz
LWP failed with code[500] message[]
Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/authors/id/D/DO/DOY/Try-Tiny-0.12.tar.gz
Catching error: "Timeout at /usr/share/perl5/Net/FTP.pm line 491\cJ" at /usr/share/perl5/CPAN.pm line 391
CPAN::shell() called at -e line 1

did you do what it suggested?
If you're the victim of such problems, please consider unsetting the ftp config variable with
o conf ftp ""
o conf commit
Alternatively, you can download the module as a gz file from the cpan site
uncompress it cd to the directory
do
perl Build.PL
./Build install
or
perl Makefile.PL
make install
accordingly.
This is all that cpan will be doing so you will see if you're missing any packages or modules
incidentally, you don't need to be root if you are happy to install your modules somewhere else. There are plenty of examples to achieve this

Related

Viewing the cpanm error log in Bitbucket pipelines when installing a Perl module fails

I have a BitBucket Pipeline that installs a bunch of Perl modules using cpanm. One of them fails and this is the snippet I can see in the log:
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/ack-v3.0.2.tar.gz ... OK
Configuring ack-v3.0.2 ... OK
==> Found dependencies: File::Next
--> Working on File::Next
Fetching http://www.cpan.org/authors/id/P/PE/PETDANCE/File-Next-1.16.tar.gz ... OK
Configuring File-Next-1.16 ... OK
Building and testing File-Next-1.16 ... OK
Successfully installed File-Next-1.16
! Installing App::Ack failed. See /root/.cpanm/work/1562605191.55/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'App::Ack' is not installed
! Bailing out the installation for ..
Building and testing ack-v3.0.2 ... FAIL
How could I access the build.log that was created by the installation process?
Apparently recently Bitbucket added a feature called "after-script" so I could add the following and that would print the content of the log files.
after-script:
- ls -1 /root/.cpanm/work/*/build.log | xargs cat
or maybe even this:
after-script:
- cat /root/.cpanm/work/*/build.log
and the following, I think, will only show the content of the log files if the build failed:
after-script:
- $BITBUCKET_EXIT_CODE && cat /root/.cpanm/work/*/build.log
Read more here: https://bitbucket.org/blog/after-scripts-now-available-for-bitbucket-pipelines

How to debug program compilation when Perl module fails

I'm trying to compile Slic3r 1.2.9 (Git 65a23b) on Raspbian, and running sudo perl Build.PL --verbose fails while building the Perl module Time-HiRes-1.9754:
...
--> Working on Time::HiRes
Fetching http://www.cpan.org/authors/id/J/JH/JHI/Time-HiRes-1.9754.tar.gz ... OK
Configuring Time-HiRes-1.9754 ... FAIL
! Timed out (> 60s). Use --verbose to retry.
! Configure failed for Time-HiRes-1.9754. See /root/.cpanm/work/1520227993.988/build.log for details.
The log file shows a little more information, but I've never worked with Perl and I don't know where to start debugging:
$ tail /root/.cpanm/work/1520234788.2186/build.log
Looking for clock_getres()... found.
Looking for clock_nanosleep()... found.
Looking for clock()... found.
Looking for working futimens()... found.
Looking for working utimensat()... found.
You seem to have subsecond timestamp setting.
Looking for stat() subsecond timestamps...
Trying struct stat st_atimespec.tv_nsec...-> FAIL Timed out (> 60s). Use --verbose to retry.
-> N/A
-> FAIL Configure failed for Time-HiRes-1.9754. See /root/.cpanm/work/1520234788.2186/build.log for details.
I've posted an issue with Slic3r on GitHub, but I haven't had any suggestions yet - presumably it's not actually a problem with Slic3r itself.
What should I do next to work out what's going wrong?

All CPAN mirrors are not working in CPAN configuration?

I am trying to install CPAN and configure it on Centos 6.
I am getting this message in configuration:
CPAN.pm requires configuration, but most of it can be done
automatically. If you answer 'no' below, you will enter an interactive
dialog for each configuration option instead. Would you like to
configure as much as possible automatically? [yes]
I chose yes, then I am prompted with this message:
Autoconfigured everything but 'urllist'.
Now you need to choose your
CPAN mirror sites. You can let me pick mirrors for you, you can
select them from a list or you can enter them by hand. Would you like
me to automatically choose some CPAN mirror sites for you? (This means
connecting to the Internet) [yes]
I also chose yes to get that message:
Trying to fetch a mirror list from the Internet Fetching with LWP:
http://www.perl.org/CPAN/MIRRORED.BY Fetching with LWP:
http://www.perl.org/CPAN/MIRRORED.BY.gz Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Fetching with LWP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Fetching with Net::FTP:
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Could not connect to host
'ftp.perl.org' with Net::FTP Fetching with Net::FTP
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Could not connect to host
'ftp.perl.org' with Net::FTP
Trying with
/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459" to get
http://www.perl.org/CPAN/MIRRORED.BY
--2015-05-25 16:39:15-- http://www.perl.org/CPAN/MIRRORED.BY Resolving www.perl.org... 108.161.188.196 Connecting to
www.perl.org|108.161.188.196|:80... failed: No route to host.
Function system("/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459"
"http://www.perl.org/CPAN/MIRRORED.BY" ")
returned status 4 (wstat 1024), left /home/abashir/.cpan/sources/MIRRORED.BY.tmp33459 with size 0
Trying with
/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
--2015-05-25 16:39:15-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
=> “/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459” Resolving ftp.perl.org... 130.161.131.20, 131.211.32.146 Connecting to
ftp.perl.org|130.161.131.20|:21... failed: No route to host.
Connecting to ftp.perl.org|131.211.32.146|:21... failed: No route to
host.
Function system("/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459"
"ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY" ")
returned status 4 (wstat 1024), left /home/abashir/.cpan/sources/MIRRORED.BY.tmp33459 with size 0
Warning: no success downloading '/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459'. Giving up on it.
No external ftp command available
Fetching with LWP: http://www.perl.org/CPAN/MIRRORED.BY Fetching with
LWP: http://www.perl.org/CPAN/MIRRORED.BY.gz
Trying with
/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459" to get
http://www.perl.org/CPAN/MIRRORED.BY
--2015-05-25 16:39:15-- http://www.perl.org/CPAN/MIRRORED.BY Resolving www.perl.org... 108.161.188.196 Connecting to
www.perl.org|108.161.188.196|:80... failed: No route to host.
Function system("/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459"
"http://www.perl.org/CPAN/MIRRORED.BY" ")
returned status 4 (wstat 1024), left /home/abashir/.cpan/sources/MIRRORED.BY.tmp33459 with size 0
Warning: no success downloading '/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459'. Giving up on it.
Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Fetching
with LWP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Fetching with
Net::FTP: ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY Could not connect
to host 'ftp.perl.org' with Net::FTP Fetching with Net::FTP
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz Could not connect to host
'ftp.perl.org' with Net::FTP
Trying with
/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459" to get
ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
--2015-05-25 16:39:17-- ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
=> “/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459” Resolving ftp.perl.org... 131.211.32.146, 130.161.131.20 Connecting to
ftp.perl.org|131.211.32.146|:21... failed: No route to host.
Connecting to ftp.perl.org|130.161.131.20|:21... failed: No route to
host.
Function system("/usr/bin/wget -O "/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459"
"ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY" ")
returned status 4 (wstat 1024), left /home/abashir/.cpan/sources/MIRRORED.BY.tmp33459 with size 0
Warning: no success downloading '/home/abashir/.cpan/sources/MIRRORED.BY.tmp33459'. Giving up on it.
No external ftp command available
Your urllist is empty! The urllist can be edited. E.g. with 'o conf
urllist push ftp://myurl/'
Could not fetch MIRRORED.BY We failed to get a copy of the mirror list
from the Internet. You will need to provide CPAN mirror URLs yourself.
Now you can enter your own CPAN URLs by hand. A local CPAN mirror can
be listed using a 'file:' URL like 'file:///path/to/cpan/'
CPAN.pm needs at least one URL where it can fetch CPAN files from.
Please enter your CPAN site: []
Then I checked the list of mirrors to in perlmodlib for netherlands(where I live), and I entered them one by one, and configuration was terminated as follows.
Please enter your CPAN site: [] ftp://ftp.quicknet.nl/pub/CPAN/ Enter
another URL or ENTER to quit: [] http://mirror.hostfuss.com/CPAN/
Enter another URL or ENTER to quit: [] ftp://mirror.hostfuss.com/CPAN/
Enter another URL or ENTER to quit: []
http://mirrors3.kernel.org/cpan/ Enter another URL or ENTER to quit:
[] ftp://mirrors3.kernel.org/pub/CPAN/ Enter another URL or ENTER to
quit: [] http://cpan.mirror.versatel.nl/ Enter another URL or ENTER to
quit: [] ftp://ftp.mirror.versatel.nl/cpan/ Enter another URL or ENTER
to quit: [] ftp://download.xs4all.nl/pub/mirror/CPAN/ Enter another
URL or ENTER to quit: [] http://mirror.leaseweb.com/CPAN/ Enter
another URL or ENTER to quit: [] ftp://mirror.leaseweb.com/CPAN/ Enter
another URL or ENTER to quit: [] ftp://ftp.cpan.nl/pub/CPAN/ Enter
another URL or ENTER to quit: [] http://archive.cs.uu.nl/mirror/CPAN/
Enter another URL or ENTER to quit: [] ftp://ftp.cs.uu.nl/mirror/CPAN/
Enter another URL or ENTER to quit: [] http://luxitude.net/cpan/ Enter
another URL or ENTER to quit: []
New urllist
ftp://ftp.quicknet.nl/pub/CPAN/ http://mirror.hostfuss.com/CPAN/
ftp://mirror.hostfuss.com/CPAN/ http://mirrors3.kernel.org/cpan/
ftp://mirrors3.kernel.org/pub/CPAN/ http://cpan.mirror.versatel.nl/
ftp://ftp.mirror.versatel.nl/cpan/
ftp://download.xs4all.nl/pub/mirror/CPAN/
http://mirror.leaseweb.com/CPAN/ ftp://mirror.leaseweb.com/CPAN/
ftp://ftp.cpan.nl/pub/CPAN/ http://archive.cs.uu.nl/mirror/CPAN/
ftp://ftp.cs.uu.nl/mirror/CPAN/ http://luxitude.net/cpan/
Autoconfiguration complete.
commit: wrote '/home/abashir/.cpan/CPAN/MyConfig.pm'
You can re-run configuration any time with 'o conf init' in the CPAN
shell
Now, whenever I try to install any module, i get errors, for example trying to install XML::Simple, I get the following at the end of trials:
Please check, if the URLs I found in your configuration file
(ftp://ftp.quicknet.nl/pub/CPAN/, http://mirror.hostfuss.com/CPAN/,
ftp://mirror.hostfuss.com/CPAN/, http://mirrors3.kernel.org/cpan/,
ftp://mirrors3.kernel.org/pub/CPAN/, http://cpan.mirror.versatel.nl/,
ftp://ftp.mirror.versatel.nl/cpan/,
ftp://download.xs4all.nl/pub/mirror/CPAN/,
http://mirror.leaseweb.com/CPAN/, ftp://mirror.leaseweb.com/CPAN/,
ftp://ftp.cpan.nl/pub/CPAN/, http://archive.cs.uu.nl/mirror/CPAN/,
ftp://ftp.cs.uu.nl/mirror/CPAN/, http://luxitude.net/cpan/) are valid.
The urllist can be edited. E.g. with 'o conf urllist push
ftp://myurl/'
Could not fetch authors/01mailrc.txt.gz Lockfile removed.
You can check the Full log of the final step here
How may I solve this ?
You seem to be behind a proxy. You have to configure the proxy in CPAN shell:
o conf http_proxy 'http://user:password#proxy.com'
run cpan shell first:
$ sudo perl -MCPAN -eshell
or from root:
# perl -MCPAN -eshell
then from the cpan shell:
cpan> install Bundle::CPAN
exit from cpan shell and build modules list (maybe need root):
$ perl -MCPAN -eautobundle
and then install needed modules, for example:
# perl -MCPAN -eshell
cpan> notest install Text::Iconv DateTime
modules will be installed to /usr/lib64/perl*/ for x86_64 system.

Error in ./configure in solaris 11

Okay i am trying to install BIND on solaris 11.
Upon downloading the tar file using wget, then i used extract it out.
After which, when i enter the command :
./configure
i face the following error
checking <<some stuff>>
..
..
..
checking <<some stuff>>
checking whether we are cross compiling... configure: error: in '/home/user/user/downloads/bind9.8.2
configure: error: cannot run C compiled programs.
If you meant to cross compile, use '--host'.
so i used --host in my option, but i cant get it to work,
For example, i entered the below command :
./configure --host=ulinux-uclibc
I received an error saying
checking host system type... Invalid configuration 'ulinux-uclibc': machine 'ulinux' not recognized
Thanks! :)
Why not just install the bind package from your configured solaris publisher?
# pkg install network/dns/bind service/network/dns/bind
should get you exactly what you need. That will get you ISC Bind v9.6.3 if you use pkg.oracle.com/solaris/release publisher.

Error while starting Apache

I am getting following error while starting apache.
Can't locate /usr/sbin/webmux.pl in #INC (#INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at (eval 2) line 1.\n
Can't load Perl file: /usr/sbin/webmux.pl for server 127.0.0.1:0, exiting...
Can anyone please suggest me what i am missing ?
mod_perl-2.0.4
So, it looks like webmux.pl needs the mysql daemon started first. I found the error message in /var/log/httpd/error_log. Start mysqld first and then the web server will start
Search your Apache config files for webmux.pl. Something must be trying to load it. Either remove the reference to it, or install it.
Found this in RT configs. After comment it, things are working now.
Error:
[root#localhost conf]# service httpd restart
Deteniendo httpd: [FALLÓ]
Iniciando httpd: [FALLÓ]
[root#localhost conf]#
Log:
[error] Can't load Perl file: /usr/sbin/webmux.pl for server localhost.localdomain:0, exiting...
DBI connect('dbname=rt3;host=localhost','rt_user',...) failed: Access denied for user 'rt_user'#'localhost' (using password: YES) at /usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 106
Solution:
[root#localhost conf]# mkdir /root/backup/httpd/ -p
[root#localhost conf]# mv /etc/httpd/conf.d/rt3.conf /root/backup/httpd/
[root#localhost conf]# service httpd restart
Deteniendo httpd: [ OK ]
Iniciando httpd: [ OK ]
[root#localhost conf]#
here is what i found on http://wiki.bestpractical.com/view/Troubleshooting
Can't locate Apache/Response.pm in #INC ...
Can't load Perl file: bin/webmux.pl for server localhost:0, exiting...
Found this issue in Aurora SPARC Linux 2.0 (Fedora Core 3 for SPARC)
when trying to install...
turns out that after installing all the modules for rt,
I still had an ancient verion of CGI.pm,
which was not intended to correctly detect the mod_perl2 modules vs.
regular mod_perl. Upgrading CGI via CPAN quickly resolved this problem after an
embarrassing number of hours troubleshooting.
If Apache refuses to start after you add PerlRequire bin/webmux.pl to your
config and you're sure you've got a valid mod_perl2 installation,
try upgrading CGI to the latest version.
maybe you can try first to update your CGI.pm module.
Did you find your call to webmux.pl in your apache conf ?
old previous useless response :
well, can you post the code from the script that tries to launch webmux.pl ?
but i would suggest a simple solution, if you don't have administrative rights or don't want
to go further in your perl conf :
add at top of your code (but below use strict...never forget this one)
in your script the code :
use lib "/usr/sbin/"
so you script will be able to use libraries located in /usr/sbin/