The Problem Tried to install the latest version of cpan and got stuck. Tracked it down to the dependency module Mac::SystemDirectory which was failing to build:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cpan[1]>install Mac::SystemDirectory
Reading'/var/root/.cpan/Metadata'
Database was generated on Sun,09Jun201907:17:02GMT
Running install formodule'Mac::SystemDirectory'
Running make forE/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz
Couldn't execute cc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -c HASCOMPILEREZFt/TESTUSSI.c -o HASCOMPILEREZFt/TESTUSSI.o: Inappropriate ioctl for device at Makefile.PL line 14.
Requires a compiler
Warning: No success on command[/usr/bin/perl Makefile.PL INC=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE]
ETHER/Mac-SystemDirectory-0.10.tar.gz
/usr/bin/perl Makefile.PL INC=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -- NOT OK
Running make test
Make had some problems, won'ttest
Running make install
Make had some problems,won't install
Failed during this command:
ETHER/Mac-SystemDirectory-0.10.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INC=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE'returned status6400
The Solution Use the MacOS installer command to deploy the needed files:
CPAN Error: Undefined subroutine &IO::Uncompress::Base::readonly called at /usr/lib/perl5/site_perl/5.8.8/IO/Uncompress/Base.pm Looks like CentOS update installs an older version of the Scalar::Util so that Perl could not load the module. Download the Scalar::Util module and manually install it:
To test: perl -MCPAN -e ‘shell’ For more information, visit the CPAN Util.pm page. Original Post: http://www.perlmonks.org/?displaytype=print;node_id=965635;replies=1
my $now = new Date::Manip::Date; $now->parse(‘now’); # in GMT $now->convert(‘EST5EDT’); # in Eastern time my $then = new Date::Manip::Date; $then->parse(‘200503131131’); # in GMT $then->convert(‘EST5EDT’); # in Eastern time my $delta = $now->calc($then); my @delta = $delta->value(); # get delta values as an array foreach (@delta) { $_ = abs($_); } # remove negative signs my […]
If you are seeing PAM errors in /var/webmin/miniserv.error, then try the following: # yum install pam-devel # cpan Authen::PAM # vim /etc/pam.d/webmin auth include system-auth # service webmin restart Log will now say: PAM authentication enabled instead of : PAM test failed – maybe /etc/pam.d/webmin does not exist
Create a text file containing the list of desired modules, one per line. Name it “modules.txt”. Then execute this command: for module in cat modules.txt; do echo $module; perl -MCPAN -e “install $module”; done