I had to move a perl script from an old server to a new one. Both the old and new servers are running "CentOS release 5.10 (Final)" and perl v5.8.8. (But the problem I'm running into appears to be a package management problem and not a Perl problem which is why I'm posting it to a CentOS list.)
The line of code in the script that attempts to open a Net::SFTP connection, which was working fine on the old machine, no longer works on the new machine. I've tracked it down to the module Net::SSH::Perl::Key::DSA not loading correctly on the new machine. On the old one, the line: perl -e "use Net::SSH::Perl::Key::DSA;" gives no error and no output (as expected), but on the new machine, the same line gives:
www:/var/www/html/circumventor# perl -e "use Net::SSH::Perl::Key::DSA;" Math::BigInt version 1.78 required--this is only version 1.77 at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm line 4. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm line 4. Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA.pm line 7. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA.pm line 7. Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/Key/DSA.pm line 14. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/Key/DSA.pm line 14. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.
I tried to install Math::BigInt on my new machine, by adding a file at /etc/yum.repos.d/custom.repo containing the lines:
[local] name=Perl_module baseurl=http://apt.sw.be/redhat/el5/en/i386/rpmforge/ enabled=1 gpgcheck=0
and then running "yum install Math::BigInt", but it just goes through a lot of spew and then ends with this error:
Transaction Check Error: file /usr/share/man/man3/Math::BigFloat.3pm.gz from install of perl-Math-BigIn t-1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5.i386 file /usr/share/man/man3/Math::BigInt.3pm.gz from install of perl-Math-BigInt- 1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5.i386 file /usr/share/man/man3/Math::BigInt::Calc.3pm.gz from install of perl-Math-B igInt-1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5.i3 86 file /usr/share/man/man3/Math::BigInt::CalcEmu.3pm.gz from install of perl-Mat h-BigInt-1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5 .i386
Error Summary
Both servers have Math::BigInt 1.77 installed. As far as I can tell, the reason the error occurs on the new server but not on the old server, is because on the old server the place that Math::BigInt is loaded is in the file /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm which contains the line: use Math::BigInt; whereas on the new server, Math::BigInt is loaded in the file /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm which contains the line: use Math::BigInt 1.78 try => 'GMP, Pari';
However, that's where my "expertise", such as it is, runs out. I have no idea why the two machines even attempt to load Math::BigInt in two different ways since I don't remember installing things differently on them. I would like to fix the problem on the new machine in the cleanest possible way (i.e., not just commenting out the "1.78" in the line "use Math::BigInt 1.78" -- I don't think that would be the "clean" solution!).
Any idea what to do?
Bennett
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
Tom Robinson IT Manager/System Administrator
MoTeC Pty Ltd
121 Merrindale Drive Croydon South 3136 Victoria Australia
T: +61 3 9761 5050 F: +61 3 9761 5051 E: tom.robinson@motec.com.au
On 01/04/14 13:34, Bennett Haselton wrote:
I had to move a perl script from an old server to a new one. Both the old and new servers are running "CentOS release 5.10 (Final)" and perl v5.8.8. (But the problem I'm running into appears to be a package management problem and not a Perl problem which is why I'm posting it to a CentOS list.)
The line of code in the script that attempts to open a Net::SFTP connection, which was working fine on the old machine, no longer works on the new machine. I've tracked it down to the module Net::SSH::Perl::Key::DSA not loading correctly on the new machine. On the old one, the line: perl -e "use Net::SSH::Perl::Key::DSA;" gives no error and no output (as expected), but on the new machine, the same line gives:
www:/var/www/html/circumventor# perl -e "use Net::SSH::Perl::Key::DSA;" Math::BigInt version 1.78 required--this is only version 1.77 at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm line 4. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm line 4. Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA.pm line 7. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA.pm line 7. Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/Key/DSA.pm line 14. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/Key/DSA.pm line 14. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.
I tried to install Math::BigInt on my new machine, by adding a file at /etc/yum.repos.d/custom.repo containing the lines:
[local] name=Perl_module baseurl=http://apt.sw.be/redhat/el5/en/i386/rpmforge/ enabled=1 gpgcheck=0
and then running "yum install Math::BigInt", but it just goes through a lot of spew and then ends with this error:
Transaction Check Error: file /usr/share/man/man3/Math::BigFloat.3pm.gz from install of perl-Math-BigIn t-1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5.i386 file /usr/share/man/man3/Math::BigInt.3pm.gz from install of perl-Math-BigInt- 1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5.i386 file /usr/share/man/man3/Math::BigInt::Calc.3pm.gz from install of perl-Math-B igInt-1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5.i3 86 file /usr/share/man/man3/Math::BigInt::CalcEmu.3pm.gz from install of perl-Mat h-BigInt-1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5 .i386
Error Summary
Both servers have Math::BigInt 1.77 installed. As far as I can tell, the reason the error occurs on the new server but not on the old server, is because on the old server the place that Math::BigInt is loaded is in the file /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm which contains the line: use Math::BigInt; whereas on the new server, Math::BigInt is loaded in the file /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm which contains the line: use Math::BigInt 1.78 try => 'GMP, Pari';
However, that's where my "expertise", such as it is, runs out. I have no idea why the two machines even attempt to load Math::BigInt in two different ways since I don't remember installing things differently on them. I would like to fix the problem on the new machine in the cleanest possible way (i.e., not just commenting out the "1.78" in the line "use Math::BigInt 1.78" -- I don't think that would be the "clean" solution!).
Any idea what to do?
Bennett _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
for that matter, on both machines...
rpm -qa |grep ^perl
On 3/31/2014 8:10 PM, John R Pierce wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
for that matter, on both machines...
rpm -qa |grep ^perl
Old machine:
perl-Test-Mock-LWP-0.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf perl-Net-Daemon-0.43-1.el5.rf perl-XML-LibXML-1.70-2.el5.rf perl-Net-SSLeay-1.36-1.el5.rf perl-DBD-mysql-4.014-1.el5.rf perl-Crypt-SSLeay-0.57-3.el5.rf perl-Sub-Uplevel-0.2002-1.el5.rf perl-IO-Tty-1.08-2.el5.rf perl-Digest-HMAC-1.01-15 perl-5.8.8-41.el5 perl-libwww-perl-5.805-1.1.1 perl-Test-MockObject-1.09-1.el5.rf perl-LWP-UserAgent-Determined-1.04-1.el5.rf perl-Convert-ASN1-0.22-1.el5.rf perl-UNIVERSAL-can-1.16-1.el5.rf perl-XML-NamespaceSupport-1.11-1.el5.rf perl-IO-Compress-2.030-2.el5.rf perl-Email-Date-Format-1.002-1.el5.rf perl-Expect-1.21-1.el5.rf perl-Test-Warn-0.22-1.el5.rf perl-Net-IP-1.25-2.fc6 perl-WWW-Mechanize-1.72-1.el5.rf perl-suidperl-5.8.8-41.el5 perl-Net-Telnet-3.03-5 perl-UNIVERSAL-isa-1.03-1.el5.rf perl-XML-SAX-0.96-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf perl-Tree-DAG_Node-1.06-1.el5.rf perl-Compress-Raw-Bzip2-2.052-1.el5.rf perl-Compress-Raw-Zlib-2.052-1.el5.rf perl-Net-DNS-0.59-3.el5 perl-URI-1.35-3 perl-PlRPC-0.2020-1.el5.rf perl-DBI-1.615-1.el5.rf perl-HTTP-Server-Simple-0.43-1.el5.rf perl-Digest-SHA1-2.11-1.2.1 perl-IO-Socket-SSL-1.01-2.el5 perl-MIME-Lite-3.029-1.el5.rf
New machine:
perl-DBD-MySQL-3.0007-2.el5 perl-URI-1.35-3 perl-Compress-Zlib-1.42-1.fc6 perl-String-CRC32-1.4-2.fc6 perl-Tie-EncryptedHash-1.24-1.el5.rf perl-Sort-Versions-1.5-1.2.el5.rf perl-File-Which-1.09-1.el5.rf perl-Class-Loader-2.03-1.2.el5.rf perl-Net-SSH-Perl-1.34-1.el5.rf perl-5.8.8-41.el5 perl-Math-Pari-2.01080603-1.el5.rf perl-Crypt-IDEA-1.08-1.el5.rf perl-Math-GMP-2.05-1.el5.rf perl-Crypt-DES-2.05-3.2.el5.rf perl-Data-Buffer-0.04-1.2.el5.rf perl-Convert-ASCII-Armour-1.4-1.2.el5.rf perl-Probe-Perl-0.01-1.el5.rf perl-Crypt-DH-0.06-1.2.el5.rf perl-Test-Script-1.05-1.el5.rf perl-Crypt-DSA-1.16-1.el5.rf perl-Convert-PEM-0.07-1.2.el5.rf perl-Crypt-Random-1.25-1.2.el5.rf perl-Crypt-RSA-1.99-1.el5.rf perl-Net-SFTP-0.10-1.el5.rf perl-Crypt-Twofish-2.13-1.el5.rf perl-DBI-1.52-2.el5 perl-Digest-SHA1-2.11-1.2.1 perl-Digest-MD2-2.03-1.2.el5.rf perl-Crypt-CBC-2.30-1.el5.rf perl-Digest-HMAC-1.01-15 perl-IPC-Run3-0.043-1.el5.rf perl-Convert-ASN1-0.20-1.1 perl-Crypt-Primes-0.50-1.2.el5.rf perl-suidperl-5.8.8-41.el5
Thanks!
Bennett
On 3/31/2014 10:20 PM, Bennett Haselton wrote:
On 3/31/2014 8:10 PM, John R Pierce wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
for that matter, on both machines...
rpm -qa |grep ^perl
Old machine:
perl-Test-Mock-LWP-0.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf perl-Net-Daemon-0.43-1.el5.rf perl-XML-LibXML-1.70-2.el5.rf perl-Net-SSLeay-1.36-1.el5.rf perl-DBD-mysql-4.014-1.el5.rf perl-Crypt-SSLeay-0.57-3.el5.rf perl-Sub-Uplevel-0.2002-1.el5.rf perl-IO-Tty-1.08-2.el5.rf perl-Digest-HMAC-1.01-15 perl-5.8.8-41.el5 perl-libwww-perl-5.805-1.1.1 perl-Test-MockObject-1.09-1.el5.rf perl-LWP-UserAgent-Determined-1.04-1.el5.rf perl-Convert-ASN1-0.22-1.el5.rf perl-UNIVERSAL-can-1.16-1.el5.rf perl-XML-NamespaceSupport-1.11-1.el5.rf perl-IO-Compress-2.030-2.el5.rf perl-Email-Date-Format-1.002-1.el5.rf perl-Expect-1.21-1.el5.rf perl-Test-Warn-0.22-1.el5.rf perl-Net-IP-1.25-2.fc6 perl-WWW-Mechanize-1.72-1.el5.rf perl-suidperl-5.8.8-41.el5 perl-Net-Telnet-3.03-5 perl-UNIVERSAL-isa-1.03-1.el5.rf perl-XML-SAX-0.96-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf perl-Tree-DAG_Node-1.06-1.el5.rf perl-Compress-Raw-Bzip2-2.052-1.el5.rf perl-Compress-Raw-Zlib-2.052-1.el5.rf perl-Net-DNS-0.59-3.el5 perl-URI-1.35-3 perl-PlRPC-0.2020-1.el5.rf perl-DBI-1.615-1.el5.rf perl-HTTP-Server-Simple-0.43-1.el5.rf perl-Digest-SHA1-2.11-1.2.1 perl-IO-Socket-SSL-1.01-2.el5 perl-MIME-Lite-3.029-1.el5.rf
New machine:
perl-DBD-MySQL-3.0007-2.el5 perl-URI-1.35-3 perl-Compress-Zlib-1.42-1.fc6 perl-String-CRC32-1.4-2.fc6 perl-Tie-EncryptedHash-1.24-1.el5.rf perl-Sort-Versions-1.5-1.2.el5.rf perl-File-Which-1.09-1.el5.rf perl-Class-Loader-2.03-1.2.el5.rf perl-Net-SSH-Perl-1.34-1.el5.rf perl-5.8.8-41.el5 perl-Math-Pari-2.01080603-1.el5.rf perl-Crypt-IDEA-1.08-1.el5.rf perl-Math-GMP-2.05-1.el5.rf perl-Crypt-DES-2.05-3.2.el5.rf perl-Data-Buffer-0.04-1.2.el5.rf perl-Convert-ASCII-Armour-1.4-1.2.el5.rf perl-Probe-Perl-0.01-1.el5.rf perl-Crypt-DH-0.06-1.2.el5.rf perl-Test-Script-1.05-1.el5.rf perl-Crypt-DSA-1.16-1.el5.rf perl-Convert-PEM-0.07-1.2.el5.rf perl-Crypt-Random-1.25-1.2.el5.rf perl-Crypt-RSA-1.99-1.el5.rf perl-Net-SFTP-0.10-1.el5.rf perl-Crypt-Twofish-2.13-1.el5.rf perl-DBI-1.52-2.el5 perl-Digest-SHA1-2.11-1.2.1 perl-Digest-MD2-2.03-1.2.el5.rf perl-Crypt-CBC-2.30-1.el5.rf perl-Digest-HMAC-1.01-15 perl-IPC-Run3-0.043-1.el5.rf perl-Convert-ASN1-0.20-1.1 perl-Crypt-Primes-0.50-1.2.el5.rf perl-suidperl-5.8.8-41.el5
you have a mix of el5 (centos5), and rf (rpmforge) modules, with a couple of fedora 6 modules thrown in, and I don't believe the same versions on the two servers. its no wonder you're seeing different stuff.
have you also been installing perl modules with CPAN ?
On 01/04/14 16:43, John R Pierce wrote:
On 3/31/2014 10:20 PM, Bennett Haselton wrote:
On 3/31/2014 8:10 PM, John R Pierce wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
for that matter, on both machines...
rpm -qa |grep ^perl
Old machine:
perl-Test-Mock-LWP-0.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf perl-Net-Daemon-0.43-1.el5.rf perl-XML-LibXML-1.70-2.el5.rf perl-Net-SSLeay-1.36-1.el5.rf perl-DBD-mysql-4.014-1.el5.rf perl-Crypt-SSLeay-0.57-3.el5.rf perl-Sub-Uplevel-0.2002-1.el5.rf perl-IO-Tty-1.08-2.el5.rf perl-Digest-HMAC-1.01-15 perl-5.8.8-41.el5 perl-libwww-perl-5.805-1.1.1 perl-Test-MockObject-1.09-1.el5.rf perl-LWP-UserAgent-Determined-1.04-1.el5.rf perl-Convert-ASN1-0.22-1.el5.rf perl-UNIVERSAL-can-1.16-1.el5.rf perl-XML-NamespaceSupport-1.11-1.el5.rf perl-IO-Compress-2.030-2.el5.rf perl-Email-Date-Format-1.002-1.el5.rf perl-Expect-1.21-1.el5.rf perl-Test-Warn-0.22-1.el5.rf perl-Net-IP-1.25-2.fc6 perl-WWW-Mechanize-1.72-1.el5.rf perl-suidperl-5.8.8-41.el5 perl-Net-Telnet-3.03-5 perl-UNIVERSAL-isa-1.03-1.el5.rf perl-XML-SAX-0.96-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf perl-Tree-DAG_Node-1.06-1.el5.rf perl-Compress-Raw-Bzip2-2.052-1.el5.rf perl-Compress-Raw-Zlib-2.052-1.el5.rf perl-Net-DNS-0.59-3.el5 perl-URI-1.35-3 perl-PlRPC-0.2020-1.el5.rf perl-DBI-1.615-1.el5.rf perl-HTTP-Server-Simple-0.43-1.el5.rf perl-Digest-SHA1-2.11-1.2.1 perl-IO-Socket-SSL-1.01-2.el5 perl-MIME-Lite-3.029-1.el5.rf
New machine:
perl-DBD-MySQL-3.0007-2.el5 perl-URI-1.35-3 perl-Compress-Zlib-1.42-1.fc6 perl-String-CRC32-1.4-2.fc6 perl-Tie-EncryptedHash-1.24-1.el5.rf perl-Sort-Versions-1.5-1.2.el5.rf perl-File-Which-1.09-1.el5.rf perl-Class-Loader-2.03-1.2.el5.rf perl-Net-SSH-Perl-1.34-1.el5.rf perl-5.8.8-41.el5 perl-Math-Pari-2.01080603-1.el5.rf perl-Crypt-IDEA-1.08-1.el5.rf perl-Math-GMP-2.05-1.el5.rf perl-Crypt-DES-2.05-3.2.el5.rf perl-Data-Buffer-0.04-1.2.el5.rf perl-Convert-ASCII-Armour-1.4-1.2.el5.rf perl-Probe-Perl-0.01-1.el5.rf perl-Crypt-DH-0.06-1.2.el5.rf perl-Test-Script-1.05-1.el5.rf perl-Crypt-DSA-1.16-1.el5.rf perl-Convert-PEM-0.07-1.2.el5.rf perl-Crypt-Random-1.25-1.2.el5.rf perl-Crypt-RSA-1.99-1.el5.rf perl-Net-SFTP-0.10-1.el5.rf perl-Crypt-Twofish-2.13-1.el5.rf perl-DBI-1.52-2.el5 perl-Digest-SHA1-2.11-1.2.1 perl-Digest-MD2-2.03-1.2.el5.rf perl-Crypt-CBC-2.30-1.el5.rf perl-Digest-HMAC-1.01-15 perl-IPC-Run3-0.043-1.el5.rf perl-Convert-ASN1-0.20-1.1 perl-Crypt-Primes-0.50-1.2.el5.rf perl-suidperl-5.8.8-41.el5
you have a mix of el5 (centos5), and rf (rpmforge) modules, with a couple of fedora 6 modules thrown in, and I don't believe the same versions on the two servers. its no wonder you're seeing different stuff.
have you also been installing perl modules with CPAN ?
John is correct. You will have to untangle this first. Bringing the two environments into alignment is the first step. You may find that once this is done there is nothing more to do.
Others may see it differently but personally I would install packages only from CentOS and the rest from CPAN.
In your case, you may feel more comfortable duplicating the new perl environment exactly the way you created the old machine's environment.
Good luck!
On 3/31/2014 10:50 PM, Tom Robinson wrote:
Others may see it differently but personally I would install packages only from CentOS and the rest from CPAN
If possible, I would install ONLY packages from Centos and EPEL and avoid CPAN entirely. if you absolutely need something thats not in core or EPEL, I'd use cpanspec to build an rpm, and use that to install on your production systems.
On 01/04/14 16:57, John R Pierce wrote:
On 3/31/2014 10:50 PM, Tom Robinson wrote:
Others may see it differently but personally I would install packages only from CentOS and the rest from CPAN
If possible, I would install ONLY packages from Centos and EPEL and avoid CPAN entirely. if you absolutely need something thats not in core or EPEL, I'd use cpanspec to build an rpm, and use that to install on your production systems.
Interesting. I will look at cpanspec. Didn't know that one.
I used to stick to the packages only approach but came up against more issues that way. I also spent a lot of time compiling and build packages. At the end of the day, CPAN consistently built a very tidy environment.
I do agree, though. Install from as few repo's as possible. CentOS and EPEL are good choices.
On 3/31/2014 11:13 PM, Tom Robinson wrote:
I used to stick to the packages only approach but came up against more issues that way. I also spent a lot of time compiling and build packages. At the end of the day, CPAN consistently built a very tidy environment
the problem with CPAN is its hard to maintain compatibility with multiple systems, each time you build it, you get something else. once you build a set of RPMs you can deploy them over and over, and if you need to update stuff, you can rebuild them with the same spec against a different system base.
On Tue, Apr 1, 2014 at 1:29 AM, John R Pierce pierce@hogranch.com wrote:
On 3/31/2014 11:13 PM, Tom Robinson wrote:
I used to stick to the packages only approach but came up against more issues that way. I also spent a lot of time compiling and build packages. At the end of the day, CPAN consistently built a very tidy environment
the problem with CPAN is its hard to maintain compatibility with multiple systems, each time you build it, you get something else. once you build a set of RPMs you can deploy them over and over, and if you need to update stuff, you can rebuild them with the same spec against a different system base.
And worse, even if you don't rebuild your CPAN packages, the packaged versions may drift out of compatibility or decide to include different/incompatible versions of the same module as you do the updates you are pretty much forced to do to pick up security and bug fixes. Likewise, things you've installed from rpmforge may subsequently become available from EPEL and be overwritten, possibly with incompatible changes. I'd try to get as much as possible from EPEL, keep any other 3rd party repos disabled except when explicitly specifying packages for installs/updates and document everything that is not base/EPEL so you know where to look when things break.
On 01/04/14 17:29, John R Pierce wrote:
On 3/31/2014 11:13 PM, Tom Robinson wrote:
I used to stick to the packages only approach but came up against more issues that way. I also spent a lot of time compiling and build packages. At the end of the day, CPAN consistently built a very tidy environment
the problem with CPAN is its hard to maintain compatibility with multiple systems, each time you build it, you get something else. once you build a set of RPMs you can deploy them over and over, and if you need to update stuff, you can rebuild them with the same spec against a different system base.
Clearly in Bennet's case he's done his best to use RPMs to manage the perl environment and failed. There's a case here for using CPAN directly.
I do understand your point and agree that packaging will give you consistency. If you know what you are doing, CPAN works well, too.
It's obvious that both approaches have pros/cons.
On 04/01/14 02:13, Tom Robinson wrote:
On 01/04/14 16:57, John R Pierce wrote:
On 3/31/2014 10:50 PM, Tom Robinson wrote:
Others may see it differently but personally I would install packages only from CentOS and the rest from CPAN
If possible, I would install ONLY packages from Centos and EPEL and avoid CPAN entirely. if you absolutely need something thats not in core or EPEL, I'd use cpanspec to build an rpm, and use that to install on your production systems.
Interesting. I will look at cpanspec. Didn't know that one.
<snip> I've used that for several packages that some researchers wanted. Be warned: how easy or difficult it is to build depends *entirely* on the programming competency, NOT the subject matter expertise, of the project contributors.
sci-kit was *very* easy to build. So was another, which I forget the name of now. bio-perl was a disaster, and took weeks - a lot seemed to have been built on ubuntu, and some... I have *no* idea - BSD? Solaris? - but a number of modules had *hard-coded* into them /usr/bin/perl, and a few /usr/local/bin/perl, and on, and on, and oh, you need this module, and that, - it was something like 10 other modules, and *then* you find in the docs about the two major packages that have a circular dependency!
This is just to warn you... but when the code is code, it works beautifully.
mark
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
On the old machine: perl-Net-IP-1.25-2.fc6
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
On the new machine: perl-Crypt-DSA-1.16-1.el5.rf
Tom Robinson IT Manager/System Administrator
MoTeC Pty Ltd
121 Merrindale Drive Croydon South 3136 Victoria Australia
T: +61 3 9761 5050 F: +61 3 9761 5051 E: tom.robinson@motec.com.au
On 01/04/14 13:34, Bennett Haselton wrote:
I had to move a perl script from an old server to a new one. Both the old and new servers are running "CentOS release 5.10 (Final)" and perl v5.8.8. (But the problem I'm running into appears to be a package management problem and not a Perl problem which is why I'm posting it to a CentOS list.)
The line of code in the script that attempts to open a Net::SFTP connection, which was working fine on the old machine, no longer works on the new machine. I've tracked it down to the module Net::SSH::Perl::Key::DSA not loading correctly on the new machine. On the old one, the line: perl -e "use Net::SSH::Perl::Key::DSA;" gives no error and no output (as expected), but on the new machine, the same line gives:
www:/var/www/html/circumventor# perl -e "use Net::SSH::Perl::Key::DSA;" Math::BigInt version 1.78 required--this is only version 1.77 at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm line 4. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm line 4. Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA.pm line 7. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA.pm line 7. Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/Key/DSA.pm line 14. BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/Key/DSA.pm line 14. Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1.
I tried to install Math::BigInt on my new machine, by adding a file at /etc/yum.repos.d/custom.repo containing the lines:
[local] name=Perl_module baseurl=http://apt.sw.be/redhat/el5/en/i386/rpmforge/ enabled=1 gpgcheck=0
and then running "yum install Math::BigInt", but it just goes through a lot of spew and then ends with this error:
Transaction Check Error: file /usr/share/man/man3/Math::BigFloat.3pm.gz from install of perl-Math-BigIn t-1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5.i386 file /usr/share/man/man3/Math::BigInt.3pm.gz from install of perl-Math-BigInt- 1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5.i386 file /usr/share/man/man3/Math::BigInt::Calc.3pm.gz from install of perl-Math-B igInt-1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5.i3 86 file /usr/share/man/man3/Math::BigInt::CalcEmu.3pm.gz from install of perl-Mat h-BigInt-1.89-1.el5.rf.noarch conflicts with file from package perl-5.8.8-41.el5 .i386
Error Summary
Both servers have Math::BigInt 1.77 installed. As far as I can tell, the reason the error occurs on the new server but not on the old server, is because on the old server the place that Math::BigInt is loaded is in the file /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm which contains the line: use Math::BigInt; whereas on the new server, Math::BigInt is loaded in the file /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm which contains the line: use Math::BigInt 1.78 try => 'GMP, Pari';
However, that's where my "expertise", such as it is, runs out. I have no idea why the two machines even attempt to load Math::BigInt in two different ways since I don't remember installing things differently on them. I would like to fix the problem on the new machine in the cleanest possible way (i.e., not just commenting out the "1.78" in the line "use Math::BigInt 1.78" -- I don't think that would be the "clean" solution!).
Any idea what to do?
Bennett _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 01/04/14 16:19, Bennett Haselton wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
On the old machine: perl-Net-IP-1.25-2.fc6
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
On the new machine: perl-Crypt-DSA-1.16-1.el5.rf
That should be a good starting point. Your check on installed packages as preposed by John shows two very different packaged environments. Did you ever use CPAN on the old or new machine? I would work to bring the new machine's perl environment as close to that of the old machine's.
Indeed, perl-Net-SFTP package is only installed on the new machine!
Your package output is reformatted here. Work through this to bring your environments as close as possible and check if you have used CPAN to install packages in the past.
$ diff -yW80 /tmp/oldlist /tmp/newlist perl-5.8.8-41.el5 perl-5.8.8-41.el5 perl-Compress-Raw-Bzip2-2.052-1.el5.r | perl-Class-Loader-2.03-1.2.el5.rf perl-Compress-Raw-Zlib-2.052-1.el5.rf | perl-Compress-Zlib-1.42-1.fc6 perl-Convert-ASN1-0.22-1.el5.rf | perl-Convert-ASCII-Armour-1.4-1.2.el5 perl-Crypt-SSLeay-0.57-3.el5.rf | perl-Convert-ASN1-0.20-1.1 perl-DBD-mysql-4.014-1.el5.rf | perl-Convert-PEM-0.07-1.2.el5.rf perl-DBI-1.615-1.el5.rf | perl-Crypt-CBC-2.30-1.el5.rf > perl-Crypt-DES-2.05-3.2.el5.rf > perl-Crypt-DH-0.06-1.2.el5.rf > perl-Crypt-DSA-1.16-1.el5.rf > perl-Crypt-IDEA-1.08-1.el5.rf > perl-Crypt-Primes-0.50-1.2.el5.rf > perl-Crypt-RSA-1.99-1.el5.rf > perl-Crypt-Random-1.25-1.2.el5.rf > perl-Crypt-Twofish-2.13-1.el5.rf > perl-DBD-MySQL-3.0007-2.el5 > perl-DBI-1.52-2.el5 > perl-Data-Buffer-0.04-1.2.el5.rf perl-Digest-HMAC-1.01-15 perl-Digest-HMAC-1.01-15 > perl-Digest-MD2-2.03-1.2.el5.rf perl-Digest-SHA1-2.11-1.2.1 perl-Digest-SHA1-2.11-1.2.1 perl-Email-Date-Format-1.002-1.el5.rf | perl-File-Which-1.09-1.el5.rf perl-Expect-1.21-1.el5.rf | perl-IPC-Run3-0.043-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf | perl-Math-GMP-2.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf | perl-Math-Pari-2.01080603-1.el5.rf perl-HTTP-Server-Simple-0.43-1.el5.rf | perl-Net-SFTP-0.10-1.el5.rf perl-IO-Compress-2.030-2.el5.rf | perl-Net-SSH-Perl-1.34-1.el5.rf perl-IO-Socket-SSL-1.01-2.el5 | perl-Probe-Perl-0.01-1.el5.rf perl-IO-Tty-1.08-2.el5.rf | perl-Sort-Versions-1.5-1.2.el5.rf perl-LWP-UserAgent-Determined-1.04-1. | perl-String-CRC32-1.4-2.fc6 perl-MIME-Lite-3.029-1.el5.rf | perl-Test-Script-1.05-1.el5.rf perl-Net-DNS-0.59-3.el5 | perl-Tie-EncryptedHash-1.24-1.el5.rf perl-Net-Daemon-0.43-1.el5.rf < perl-Net-IP-1.25-2.fc6 < perl-Net-SSLeay-1.36-1.el5.rf < perl-Net-Telnet-3.03-5 < perl-PlRPC-0.2020-1.el5.rf < perl-Sub-Uplevel-0.2002-1.el5.rf < perl-Test-Mock-LWP-0.05-1.el5.rf < perl-Test-MockObject-1.09-1.el5.rf < perl-Test-Warn-0.22-1.el5.rf < perl-Tree-DAG_Node-1.06-1.el5.rf < perl-UNIVERSAL-can-1.16-1.el5.rf < perl-UNIVERSAL-isa-1.03-1.el5.rf < perl-URI-1.35-3 perl-URI-1.35-3 perl-WWW-Mechanize-1.72-1.el5.rf < perl-XML-LibXML-1.70-2.el5.rf < perl-XML-NamespaceSupport-1.11-1.el5. < perl-XML-SAX-0.96-1.el5.rf < perl-libwww-perl-5.805-1.1.1 < perl-suidperl-5.8.8-41.el5 perl-suidperl-5.8.8-41.el5
On 3/31/2014 10:42 PM, Tom Robinson wrote:
On 01/04/14 16:19, Bennett Haselton wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
On the old machine: perl-Net-IP-1.25-2.fc6
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
On the new machine: perl-Crypt-DSA-1.16-1.el5.rf
That should be a good starting point. Your check on installed packages as preposed by John shows two very different packaged environments. Did you ever use CPAN on the old or new machine?
Yes, on both. I needed it because I needed to install Crypt::Twofish and it didn't seem to be available from the default repositories used by yum but it was available from CPAN.
Because there were dozens of sources that I read, plus probably thousands of others that I didn't read, saying that installing from CPAN was a way to install Perl modules, I figured it was reasonably safe to follow those directions, so I went ahead and did it.
Now, later I found out that you can get your machine into an inconsistent state by installing things from both CPAN and yum repositories, and moreover apparently you can't even properly uninstall things that are installed by CPAN: http://stackoverflow.com/questions/2626449/how-can-i-de-install-a-perl-modul... so by following directions to the letter which are repeated in thousands of sources, I apparently put my machine in a state that will cause frequent unpredictable conflicts with all the things installed by the system package manager, and the damage is irreversible.
Is that about right? :)
At about the same time I learned not to use CPAN, the person helping me solve the current problem said that I could make the run-time errors go away by going into CPAN and install Math::BigInt -- which led to a new error, getting "Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::Calc at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DH.pm line 6", so then I installed Math::BigInt::Pari through CPAN and it fixed the problem. I had to use CPAN because it was the only solution he knew and it was an emergency to get that error fixed.
So, going forward, to mitigate the damage, should I just take all the packages that are currently only listed as installed on the old machine, truncate the version number (so e.g. truncate "perl-Compress-Raw-Zlib-2.052-1.el5.rf" to just "perl-Compress-Raw-Zlib2") and install that with yum on the command line? (Thanks for that list, by the way.)
And more generally, what is the best practice if I want to install a module like Crypt::Twofish that was not in the default yum repositories, if John and C.L. are saying to avoid CPAN, and both John and Tom are saying to avoid adding extra yum repositories? I'd like to use yum just for consistency since it automatically handles dependencies and such, and at least if I always use yum, then yum will always be "aware" of what's installed already (as opposed to things installed from CPAN).
Bennett
I would work to bring the new machine's perl environment as close to that of the old machine's.
Indeed, perl-Net-SFTP package is only installed on the new machine!
Your package output is reformatted here. Work through this to bring your environments as close as possible and check if you have used CPAN to install packages in the past.
$ diff -yW80 /tmp/oldlist /tmp/newlist perl-5.8.8-41.el5 perl-5.8.8-41.el5 perl-Compress-Raw-Bzip2-2.052-1.el5.r | perl-Class-Loader-2.03-1.2.el5.rf perl-Compress-Raw-Zlib-2.052-1.el5.rf | perl-Compress-Zlib-1.42-1.fc6 perl-Convert-ASN1-0.22-1.el5.rf | perl-Convert-ASCII-Armour-1.4-1.2.el5 perl-Crypt-SSLeay-0.57-3.el5.rf | perl-Convert-ASN1-0.20-1.1 perl-DBD-mysql-4.014-1.el5.rf | perl-Convert-PEM-0.07-1.2.el5.rf perl-DBI-1.615-1.el5.rf | perl-Crypt-CBC-2.30-1.el5.rf > perl-Crypt-DES-2.05-3.2.el5.rf > perl-Crypt-DH-0.06-1.2.el5.rf > perl-Crypt-DSA-1.16-1.el5.rf > perl-Crypt-IDEA-1.08-1.el5.rf > perl-Crypt-Primes-0.50-1.2.el5.rf > perl-Crypt-RSA-1.99-1.el5.rf > perl-Crypt-Random-1.25-1.2.el5.rf > perl-Crypt-Twofish-2.13-1.el5.rf > perl-DBD-MySQL-3.0007-2.el5 > perl-DBI-1.52-2.el5 > perl-Data-Buffer-0.04-1.2.el5.rf perl-Digest-HMAC-1.01-15 perl-Digest-HMAC-1.01-15 > perl-Digest-MD2-2.03-1.2.el5.rf perl-Digest-SHA1-2.11-1.2.1 perl-Digest-SHA1-2.11-1.2.1 perl-Email-Date-Format-1.002-1.el5.rf | perl-File-Which-1.09-1.el5.rf perl-Expect-1.21-1.el5.rf | perl-IPC-Run3-0.043-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf | perl-Math-GMP-2.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf | perl-Math-Pari-2.01080603-1.el5.rf perl-HTTP-Server-Simple-0.43-1.el5.rf | perl-Net-SFTP-0.10-1.el5.rf perl-IO-Compress-2.030-2.el5.rf | perl-Net-SSH-Perl-1.34-1.el5.rf perl-IO-Socket-SSL-1.01-2.el5 | perl-Probe-Perl-0.01-1.el5.rf perl-IO-Tty-1.08-2.el5.rf | perl-Sort-Versions-1.5-1.2.el5.rf perl-LWP-UserAgent-Determined-1.04-1. | perl-String-CRC32-1.4-2.fc6 perl-MIME-Lite-3.029-1.el5.rf | perl-Test-Script-1.05-1.el5.rf perl-Net-DNS-0.59-3.el5 | perl-Tie-EncryptedHash-1.24-1.el5.rf perl-Net-Daemon-0.43-1.el5.rf < perl-Net-IP-1.25-2.fc6 < perl-Net-SSLeay-1.36-1.el5.rf < perl-Net-Telnet-3.03-5 < perl-PlRPC-0.2020-1.el5.rf < perl-Sub-Uplevel-0.2002-1.el5.rf < perl-Test-Mock-LWP-0.05-1.el5.rf < perl-Test-MockObject-1.09-1.el5.rf < perl-Test-Warn-0.22-1.el5.rf < perl-Tree-DAG_Node-1.06-1.el5.rf < perl-UNIVERSAL-can-1.16-1.el5.rf < perl-UNIVERSAL-isa-1.03-1.el5.rf < perl-URI-1.35-3 perl-URI-1.35-3 perl-WWW-Mechanize-1.72-1.el5.rf < perl-XML-LibXML-1.70-2.el5.rf < perl-XML-NamespaceSupport-1.11-1.el5. < perl-XML-SAX-0.96-1.el5.rf < perl-libwww-perl-5.805-1.1.1 < perl-suidperl-5.8.8-41.el5 perl-suidperl-5.8.8-41.el5
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Tom Robinson IT Manager/System Administrator
MoTeC Pty Ltd
121 Merrindale Drive Croydon South 3136 Victoria Australia
T: +61 3 9761 5050 F: +61 3 9761 5051 E: tom.robinson@motec.com.au
On 01/04/14 19:04, Bennett Haselton wrote:
On 3/31/2014 10:42 PM, Tom Robinson wrote:
On 01/04/14 16:19, Bennett Haselton wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
On the old machine: perl-Net-IP-1.25-2.fc6
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
On the new machine: perl-Crypt-DSA-1.16-1.el5.rf
That should be a good starting point. Your check on installed packages as preposed by John shows two very different packaged environments. Did you ever use CPAN on the old or new machine?
Yes, on both. I needed it because I needed to install Crypt::Twofish and it didn't seem to be available from the default repositories used by yum but it was available from CPAN.
So I stand alone on this, but CPAN can work. I use it.
Because there were dozens of sources that I read, plus probably thousands of others that I didn't read, saying that installing from CPAN was a way to install Perl modules, I figured it was reasonably safe to follow those directions, so I went ahead and did it.
Part of the issue is, as others have stated, you have a mish/mash of so many different sources that they don't play together nicely any more. Best if you pare back to the basics.
Try just core and EPEL packages to start with. If you can't find a package for your needs you have a few options. Compile a package yourself or use CPAN.
CPAN on CentOS 5 is more difficult because when package updates arrive they can clobber you nicely installed CPAN libraries. CentOS 6 handles this better. CPAN does allow you to configure the install path for libraries, however, so you can defeat the package update clobberring issue.
In your case, probably best to stick with the package approach and compile a new package based on the installed core and EPEL packages to resolve the rest of your requirements.
Now, later I found out that you can get your machine into an inconsistent state by installing things from both CPAN and yum repositories, and moreover apparently you can't even properly uninstall things that are installed by CPAN: http://stackoverflow.com/questions/2626449/how-can-i-de-install-a-perl-modul... so by following directions to the letter which are repeated in thousands of sources, I apparently put my machine in a state that will cause frequent unpredictable conflicts with all the things installed by the system package manager, and the damage is irreversible.
Is that about right? :)
At about the same time I learned not to use CPAN, the person helping me solve the current problem said that I could make the run-time errors go away by going into CPAN and install Math::BigInt -- which led to a new error, getting "Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::Calc at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DH.pm line 6", so then I installed Math::BigInt::Pari through CPAN and it fixed the problem. I had to use CPAN because it was the only solution he knew and it was an emergency to get that error fixed.
So, going forward, to mitigate the damage, should I just take all the packages that are currently only listed as installed on the old machine, truncate the version number (so e.g. truncate "perl-Compress-Raw-Zlib-2.052-1.el5.rf" to just "perl-Compress-Raw-Zlib2") and install that with yum on the command line? (Thanks for that list, by the way.)
And more generally, what is the best practice if I want to install a module like Crypt::Twofish that was not in the default yum repositories, if John and C.L. are saying to avoid CPAN, and both John and Tom are saying to avoid adding extra yum repositories? I'd like to use yum just for consistency since it automatically handles dependencies and such, and at least if I always use yum, then yum will always be "aware" of what's installed already (as opposed to things installed from CPAN).
Bennett
I would work to bring the new machine's perl environment as close to that of the old machine's.
Indeed, perl-Net-SFTP package is only installed on the new machine!
Your package output is reformatted here. Work through this to bring your environments as close as possible and check if you have used CPAN to install packages in the past.
$ diff -yW80 /tmp/oldlist /tmp/newlist perl-5.8.8-41.el5 perl-5.8.8-41.el5 perl-Compress-Raw-Bzip2-2.052-1.el5.r | perl-Class-Loader-2.03-1.2.el5.rf perl-Compress-Raw-Zlib-2.052-1.el5.rf | perl-Compress-Zlib-1.42-1.fc6 perl-Convert-ASN1-0.22-1.el5.rf | perl-Convert-ASCII-Armour-1.4-1.2.el5 perl-Crypt-SSLeay-0.57-3.el5.rf | perl-Convert-ASN1-0.20-1.1 perl-DBD-mysql-4.014-1.el5.rf | perl-Convert-PEM-0.07-1.2.el5.rf perl-DBI-1.615-1.el5.rf | perl-Crypt-CBC-2.30-1.el5.rf > perl-Crypt-DES-2.05-3.2.el5.rf > perl-Crypt-DH-0.06-1.2.el5.rf > perl-Crypt-DSA-1.16-1.el5.rf > perl-Crypt-IDEA-1.08-1.el5.rf > perl-Crypt-Primes-0.50-1.2.el5.rf > perl-Crypt-RSA-1.99-1.el5.rf > perl-Crypt-Random-1.25-1.2.el5.rf > perl-Crypt-Twofish-2.13-1.el5.rf > perl-DBD-MySQL-3.0007-2.el5 > perl-DBI-1.52-2.el5 > perl-Data-Buffer-0.04-1.2.el5.rf perl-Digest-HMAC-1.01-15 perl-Digest-HMAC-1.01-15 > perl-Digest-MD2-2.03-1.2.el5.rf perl-Digest-SHA1-2.11-1.2.1 perl-Digest-SHA1-2.11-1.2.1 perl-Email-Date-Format-1.002-1.el5.rf | perl-File-Which-1.09-1.el5.rf perl-Expect-1.21-1.el5.rf | perl-IPC-Run3-0.043-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf | perl-Math-GMP-2.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf | perl-Math-Pari-2.01080603-1.el5.rf perl-HTTP-Server-Simple-0.43-1.el5.rf | perl-Net-SFTP-0.10-1.el5.rf perl-IO-Compress-2.030-2.el5.rf | perl-Net-SSH-Perl-1.34-1.el5.rf perl-IO-Socket-SSL-1.01-2.el5 | perl-Probe-Perl-0.01-1.el5.rf perl-IO-Tty-1.08-2.el5.rf | perl-Sort-Versions-1.5-1.2.el5.rf perl-LWP-UserAgent-Determined-1.04-1. | perl-String-CRC32-1.4-2.fc6 perl-MIME-Lite-3.029-1.el5.rf | perl-Test-Script-1.05-1.el5.rf perl-Net-DNS-0.59-3.el5 | perl-Tie-EncryptedHash-1.24-1.el5.rf perl-Net-Daemon-0.43-1.el5.rf < perl-Net-IP-1.25-2.fc6 < perl-Net-SSLeay-1.36-1.el5.rf < perl-Net-Telnet-3.03-5 < perl-PlRPC-0.2020-1.el5.rf < perl-Sub-Uplevel-0.2002-1.el5.rf < perl-Test-Mock-LWP-0.05-1.el5.rf < perl-Test-MockObject-1.09-1.el5.rf < perl-Test-Warn-0.22-1.el5.rf < perl-Tree-DAG_Node-1.06-1.el5.rf < perl-UNIVERSAL-can-1.16-1.el5.rf < perl-UNIVERSAL-isa-1.03-1.el5.rf < perl-URI-1.35-3 perl-URI-1.35-3 perl-WWW-Mechanize-1.72-1.el5.rf < perl-XML-LibXML-1.70-2.el5.rf < perl-XML-NamespaceSupport-1.11-1.el5. < perl-XML-SAX-0.96-1.el5.rf < perl-libwww-perl-5.805-1.1.1 < perl-suidperl-5.8.8-41.el5 perl-suidperl-5.8.8-41.el5
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 4/1/2014 4:10 PM, Tom Robinson wrote:
Tom Robinson IT Manager/System Administrator
MoTeC Pty Ltd
121 Merrindale Drive Croydon South 3136 Victoria Australia
T: +61 3 9761 5050 F: +61 3 9761 5051 E: tom.robinson@motec.com.au
On 01/04/14 19:04, Bennett Haselton wrote:
On 3/31/2014 10:42 PM, Tom Robinson wrote:
On 01/04/14 16:19, Bennett Haselton wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
On the old machine: perl-Net-IP-1.25-2.fc6
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
On the new machine: perl-Crypt-DSA-1.16-1.el5.rf
That should be a good starting point. Your check on installed packages as preposed by John shows two very different packaged environments. Did you ever use CPAN on the old or new machine?
Yes, on both. I needed it because I needed to install Crypt::Twofish and it didn't seem to be available from the default repositories used by yum but it was available from CPAN.
So I stand alone on this, but CPAN can work. I use it.
Well it sounds like it can work if you know have enough Linux knowledge that if CPAN throws you a curveball (or since you're Australian, bowls you a googly?), like package updates clobbering your libraries, and the written documentation about what to do is missing or wrong, you can fill in the gaps. I don't know enough about Linux to recognize when the documentation is wrong (or to fill in the missing parts), so I try to stay on the standard supported path as much as possible.
Because there were dozens of sources that I read, plus probably thousands of others that I didn't read, saying that installing from CPAN was a way to install Perl modules, I figured it was reasonably safe to follow those directions, so I went ahead and did it.
Part of the issue is, as others have stated, you have a mish/mash of so many different sources that they don't play together nicely any more. Best if you pare back to the basics.
Try just core and EPEL packages to start with. If you can't find a package for your needs you have a few options. Compile a package yourself or use CPAN.
CPAN on CentOS 5 is more difficult because when package updates arrive they can clobber you nicely installed CPAN libraries. CentOS 6 handles this better. CPAN does allow you to configure the install path for libraries, however, so you can defeat the package update clobberring issue.
In your case, probably best to stick with the package approach and compile a new package based on the installed core and EPEL packages to resolve the rest of your requirements.
I understand (I think), but is it easy to tell me, or is there a *reliable*, *vetted* source, describing for intermediate users how to actually do this? i.e.: 1) When you say "Try just core and EPEL packages to start with", are you talking about which .repo files I should keep in my /etc/yum.repos.d directory? OK, then which ones should be in there? Only the CentOS-* ones that were in there by default? And *not* the rpmforge.repo one? Does one of the default .repo files also include the EPEL packages? 2) And then if I want to install a module like Crypt::Twofish which isn't included in the default packages, by "compiling a new package based on the installed core and EPEL packages", then I do -- what?
I understand that if you already know the answers to these questions, it seems like the answers are "obvious" or "easy to find on Google". The problem is that's what got me here in the first place, because I did look for answers from reliable sources on Google, and didn't know enough to realize which parts of the directions were wrong. If I try to do the next step based on directions from Google, I'm not doing to know when the directions are misleading me there either. So I'm hoping someone could tell me how to do it or could point me to directions that have actually been vetted (meaning that someone showed the directions to at least one intermediate-level user and said "Here, we want these directions to be helpful to people, so try these out, let me know if you get stuck, and we'll keep revising the directions until there are no places where people get stuck any more.").
Now, later I found out that you can get your machine into an inconsistent state by installing things from both CPAN and yum repositories, and moreover apparently you can't even properly uninstall things that are installed by CPAN: http://stackoverflow.com/questions/2626449/how-can-i-de-install-a-perl-modul... so by following directions to the letter which are repeated in thousands of sources, I apparently put my machine in a state that will cause frequent unpredictable conflicts with all the things installed by the system package manager, and the damage is irreversible.
Is that about right? :)
At about the same time I learned not to use CPAN, the person helping me solve the current problem said that I could make the run-time errors go away by going into CPAN and install Math::BigInt -- which led to a new error, getting "Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::Calc at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DH.pm line 6", so then I installed Math::BigInt::Pari through CPAN and it fixed the problem. I had to use CPAN because it was the only solution he knew and it was an emergency to get that error fixed.
So, going forward, to mitigate the damage, should I just take all the packages that are currently only listed as installed on the old machine, truncate the version number (so e.g. truncate "perl-Compress-Raw-Zlib-2.052-1.el5.rf" to just "perl-Compress-Raw-Zlib2") and install that with yum on the command line? (Thanks for that list, by the way.)
And more generally, what is the best practice if I want to install a module like Crypt::Twofish that was not in the default yum repositories, if John and C.L. are saying to avoid CPAN, and both John and Tom are saying to avoid adding extra yum repositories? I'd like to use yum just for consistency since it automatically handles dependencies and such, and at least if I always use yum, then yum will always be "aware" of what's installed already (as opposed to things installed from CPAN).
Bennett
I would work to bring the new machine's perl environment as close to that of the old machine's.
Indeed, perl-Net-SFTP package is only installed on the new machine!
Your package output is reformatted here. Work through this to bring your environments as close as possible and check if you have used CPAN to install packages in the past.
$ diff -yW80 /tmp/oldlist /tmp/newlist perl-5.8.8-41.el5 perl-5.8.8-41.el5 perl-Compress-Raw-Bzip2-2.052-1.el5.r | perl-Class-Loader-2.03-1.2.el5.rf perl-Compress-Raw-Zlib-2.052-1.el5.rf | perl-Compress-Zlib-1.42-1.fc6 perl-Convert-ASN1-0.22-1.el5.rf | perl-Convert-ASCII-Armour-1.4-1.2.el5 perl-Crypt-SSLeay-0.57-3.el5.rf | perl-Convert-ASN1-0.20-1.1 perl-DBD-mysql-4.014-1.el5.rf | perl-Convert-PEM-0.07-1.2.el5.rf perl-DBI-1.615-1.el5.rf | perl-Crypt-CBC-2.30-1.el5.rf > perl-Crypt-DES-2.05-3.2.el5.rf > perl-Crypt-DH-0.06-1.2.el5.rf > perl-Crypt-DSA-1.16-1.el5.rf > perl-Crypt-IDEA-1.08-1.el5.rf > perl-Crypt-Primes-0.50-1.2.el5.rf > perl-Crypt-RSA-1.99-1.el5.rf > perl-Crypt-Random-1.25-1.2.el5.rf > perl-Crypt-Twofish-2.13-1.el5.rf > perl-DBD-MySQL-3.0007-2.el5 > perl-DBI-1.52-2.el5 > perl-Data-Buffer-0.04-1.2.el5.rf perl-Digest-HMAC-1.01-15 perl-Digest-HMAC-1.01-15 > perl-Digest-MD2-2.03-1.2.el5.rf perl-Digest-SHA1-2.11-1.2.1 perl-Digest-SHA1-2.11-1.2.1 perl-Email-Date-Format-1.002-1.el5.rf | perl-File-Which-1.09-1.el5.rf perl-Expect-1.21-1.el5.rf | perl-IPC-Run3-0.043-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf | perl-Math-GMP-2.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf | perl-Math-Pari-2.01080603-1.el5.rf perl-HTTP-Server-Simple-0.43-1.el5.rf | perl-Net-SFTP-0.10-1.el5.rf perl-IO-Compress-2.030-2.el5.rf | perl-Net-SSH-Perl-1.34-1.el5.rf perl-IO-Socket-SSL-1.01-2.el5 | perl-Probe-Perl-0.01-1.el5.rf perl-IO-Tty-1.08-2.el5.rf | perl-Sort-Versions-1.5-1.2.el5.rf perl-LWP-UserAgent-Determined-1.04-1. | perl-String-CRC32-1.4-2.fc6 perl-MIME-Lite-3.029-1.el5.rf | perl-Test-Script-1.05-1.el5.rf perl-Net-DNS-0.59-3.el5 | perl-Tie-EncryptedHash-1.24-1.el5.rf perl-Net-Daemon-0.43-1.el5.rf < perl-Net-IP-1.25-2.fc6 < perl-Net-SSLeay-1.36-1.el5.rf < perl-Net-Telnet-3.03-5 < perl-PlRPC-0.2020-1.el5.rf < perl-Sub-Uplevel-0.2002-1.el5.rf < perl-Test-Mock-LWP-0.05-1.el5.rf < perl-Test-MockObject-1.09-1.el5.rf < perl-Test-Warn-0.22-1.el5.rf < perl-Tree-DAG_Node-1.06-1.el5.rf < perl-UNIVERSAL-can-1.16-1.el5.rf < perl-UNIVERSAL-isa-1.03-1.el5.rf < perl-URI-1.35-3 perl-URI-1.35-3 perl-WWW-Mechanize-1.72-1.el5.rf < perl-XML-LibXML-1.70-2.el5.rf < perl-XML-NamespaceSupport-1.11-1.el5. < perl-XML-SAX-0.96-1.el5.rf < perl-libwww-perl-5.805-1.1.1 < perl-suidperl-5.8.8-41.el5 perl-suidperl-5.8.8-41.el5
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 02/04/14 11:16, Bennett Haselton wrote:
I understand (I think), but is it easy to tell me, or is there a *reliable*, *vetted* source, describing for intermediate users how to actually do this? i.e.:
- When you say "Try just core and EPEL packages to start with", are you
talking about which .repo files I should keep in my /etc/yum.repos.d directory? OK, then which ones should be in there? Only the CentOS-* ones that were in there by default? And *not* the rpmforge.repo one? Does one of the default .repo files also include the EPEL packages?
This depends if you already have dependencies on rpmforge. If you don't need them, remove that repo and just use the CentOS and EPEL repos for now. You may have a task here to really tidy up and remove all the fedora and rpmforge stuff. You can also make exceptions in the repo configs and the main repo config files to exclude sets of packages from those foreign repos. For example:
exclude=perl*
Check the man pages/documentation for more examples.
- And then if I want to install a module like Crypt::Twofish which
isn't included in the default packages, by "compiling a new package based on the installed core and EPEL packages", then I do -- what?
You will have to research package building a bit more yourself.
http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment
You can also draw from examples of existing packages by getting their source RPMs and reading through the spec files.
http://vault.centos.org/6.5/os/Source/SPackages/
I understand that if you already know the answers to these questions, it seems like the answers are "obvious" or "easy to find on Google". The problem is that's what got me here in the first place, because I did look for answers from reliable sources on Google, and didn't know enough to realize which parts of the directions were wrong. If I try to do the next step based on directions from Google, I'm not doing to know when the directions are misleading me there either. So I'm hoping someone could tell me how to do it or could point me to directions that have actually been vetted (meaning that someone showed the directions to at least one intermediate-level user and said "Here, we want these directions to be helpful to people, so try these out, let me know if you get stuck, and we'll keep revising the directions until there are no places where people get stuck any more.").
Start with the above. You may have open a new thread for package building support.
Another approach used by people who want to use CPAN a lot, is to download and install Perl from source to say /usr/local, and point CPAN at that. That way you get the benefits of the latest Perl and CPAN without it fighting with yum/rpm.
Your hashbang line in each Perl script that uses the alternate version of Perl would have to reflect the location of the alternate version of Perl and you would have to source any prerequisite Perl modules from CPAN, which is another chamber of hell.
But it does avoid issues like you are having.
Cheers,
Cliff
On Tue, Apr 1, 2014 at 9:04 PM, Bennett Haselton bennett@peacefire.orgwrote:
On 3/31/2014 10:42 PM, Tom Robinson wrote:
On 01/04/14 16:19, Bennett Haselton wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
On the old machine: perl-Net-IP-1.25-2.fc6
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
On the new machine: perl-Crypt-DSA-1.16-1.el5.rf
That should be a good starting point. Your check on installed packages
as preposed by John shows two
very different packaged environments. Did you ever use CPAN on the old
or new machine? Yes, on both. I needed it because I needed to install Crypt::Twofish and it didn't seem to be available from the default repositories used by yum but it was available from CPAN.
Because there were dozens of sources that I read, plus probably thousands of others that I didn't read, saying that installing from CPAN was a way to install Perl modules, I figured it was reasonably safe to follow those directions, so I went ahead and did it.
Now, later I found out that you can get your machine into an inconsistent state by installing things from both CPAN and yum repositories, and moreover apparently you can't even properly uninstall things that are installed by CPAN:
http://stackoverflow.com/questions/2626449/how-can-i-de-install-a-perl-modul... so by following directions to the letter which are repeated in thousands of sources, I apparently put my machine in a state that will cause frequent unpredictable conflicts with all the things installed by the system package manager, and the damage is irreversible.
Is that about right? :)
At about the same time I learned not to use CPAN, the person helping me solve the current problem said that I could make the run-time errors go away by going into CPAN and install Math::BigInt -- which led to a new error, getting "Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::Calc at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DH.pm line 6", so then I installed Math::BigInt::Pari through CPAN and it fixed the problem. I had to use CPAN because it was the only solution he knew and it was an emergency to get that error fixed.
So, going forward, to mitigate the damage, should I just take all the packages that are currently only listed as installed on the old machine, truncate the version number (so e.g. truncate "perl-Compress-Raw-Zlib-2.052-1.el5.rf" to just "perl-Compress-Raw-Zlib2") and install that with yum on the command line? (Thanks for that list, by the way.)
And more generally, what is the best practice if I want to install a module like Crypt::Twofish that was not in the default yum repositories, if John and C.L. are saying to avoid CPAN, and both John and Tom are saying to avoid adding extra yum repositories? I'd like to use yum just for consistency since it automatically handles dependencies and such, and at least if I always use yum, then yum will always be "aware" of what's installed already (as opposed to things installed from CPAN).
Bennett
I would work to bring the new machine's perl environment as close to that of the old
machine's.
Indeed, perl-Net-SFTP package is only installed on the new machine!
Your package output is reformatted here. Work through this to bring your
environments as close as
possible and check if you have used CPAN to install packages in the past.
$ diff -yW80 /tmp/oldlist /tmp/newlist perl-5.8.8-41.el5 perl-5.8.8-41.el5 perl-Compress-Raw-Bzip2-2.052-1.el5.r | perl-Class-Loader-2.03-1.2.el5.rf perl-Compress-Raw-Zlib-2.052-1.el5.rf | perl-Compress-Zlib-1.42-1.fc6 perl-Convert-ASN1-0.22-1.el5.rf |
perl-Convert-ASCII-Armour-1.4-1.2.el5
perl-Crypt-SSLeay-0.57-3.el5.rf | perl-Convert-ASN1-0.20-1.1 perl-DBD-mysql-4.014-1.el5.rf | perl-Convert-PEM-0.07-1.2.el5.rf perl-DBI-1.615-1.el5.rf | perl-Crypt-CBC-2.30-1.el5.rf > perl-Crypt-DES-2.05-3.2.el5.rf > perl-Crypt-DH-0.06-1.2.el5.rf > perl-Crypt-DSA-1.16-1.el5.rf > perl-Crypt-IDEA-1.08-1.el5.rf >
perl-Crypt-Primes-0.50-1.2.el5.rf
> perl-Crypt-RSA-1.99-1.el5.rf >
perl-Crypt-Random-1.25-1.2.el5.rf
> perl-Crypt-Twofish-2.13-1.el5.rf > perl-DBD-MySQL-3.0007-2.el5 > perl-DBI-1.52-2.el5 > perl-Data-Buffer-0.04-1.2.el5.rf
perl-Digest-HMAC-1.01-15 perl-Digest-HMAC-1.01-15 > perl-Digest-MD2-2.03-1.2.el5.rf perl-Digest-SHA1-2.11-1.2.1 perl-Digest-SHA1-2.11-1.2.1 perl-Email-Date-Format-1.002-1.el5.rf | perl-File-Which-1.09-1.el5.rf perl-Expect-1.21-1.el5.rf | perl-IPC-Run3-0.043-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf | perl-Math-GMP-2.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf |
perl-Math-Pari-2.01080603-1.el5.rf
perl-HTTP-Server-Simple-0.43-1.el5.rf | perl-Net-SFTP-0.10-1.el5.rf perl-IO-Compress-2.030-2.el5.rf | perl-Net-SSH-Perl-1.34-1.el5.rf perl-IO-Socket-SSL-1.01-2.el5 | perl-Probe-Perl-0.01-1.el5.rf perl-IO-Tty-1.08-2.el5.rf | perl-Sort-Versions-1.5-1.2.el5.rf perl-LWP-UserAgent-Determined-1.04-1. | perl-String-CRC32-1.4-2.fc6 perl-MIME-Lite-3.029-1.el5.rf | perl-Test-Script-1.05-1.el5.rf perl-Net-DNS-0.59-3.el5 |
perl-Tie-EncryptedHash-1.24-1.el5.rf
perl-Net-Daemon-0.43-1.el5.rf < perl-Net-IP-1.25-2.fc6 < perl-Net-SSLeay-1.36-1.el5.rf < perl-Net-Telnet-3.03-5 < perl-PlRPC-0.2020-1.el5.rf < perl-Sub-Uplevel-0.2002-1.el5.rf < perl-Test-Mock-LWP-0.05-1.el5.rf < perl-Test-MockObject-1.09-1.el5.rf < perl-Test-Warn-0.22-1.el5.rf < perl-Tree-DAG_Node-1.06-1.el5.rf < perl-UNIVERSAL-can-1.16-1.el5.rf < perl-UNIVERSAL-isa-1.03-1.el5.rf < perl-URI-1.35-3 perl-URI-1.35-3 perl-WWW-Mechanize-1.72-1.el5.rf < perl-XML-LibXML-1.70-2.el5.rf < perl-XML-NamespaceSupport-1.11-1.el5. < perl-XML-SAX-0.96-1.el5.rf < perl-libwww-perl-5.805-1.1.1 < perl-suidperl-5.8.8-41.el5 perl-suidperl-5.8.8-41.el5
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Have you thought of doing this in a Linux container to avoid tainting the base install?
On Tuesday, April 1, 2014 at 4:40 PM, Cliff Pratt wrote:
Another approach used by people who want to use CPAN a lot, is to download and install Perl from source to say /usr/local, and point CPAN at that. That way you get the benefits of the latest Perl and CPAN without it fighting with yum/rpm.
Your hashbang line in each Perl script that uses the alternate version of Perl would have to reflect the location of the alternate version of Perl and you would have to source any prerequisite Perl modules from CPAN, which is another chamber of hell.
But it does avoid issues like you are having.
Cheers,
Cliff
On Tue, Apr 1, 2014 at 9:04 PM, Bennett Haselton <bennett@peacefire.org (mailto:bennett@peacefire.org)>wrote:
On 3/31/2014 10:42 PM, Tom Robinson wrote:
On 01/04/14 16:19, Bennett Haselton wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
On the old machine: perl-Net-IP-1.25-2.fc6
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
On the new machine: perl-Crypt-DSA-1.16-1.el5.rf
That should be a good starting point. Your check on installed packages
as preposed by John shows two
very different packaged environments. Did you ever use CPAN on the old
or new machine? Yes, on both. I needed it because I needed to install Crypt::Twofish and it didn't seem to be available from the default repositories used by yum but it was available from CPAN.
Because there were dozens of sources that I read, plus probably thousands of others that I didn't read, saying that installing from CPAN was a way to install Perl modules, I figured it was reasonably safe to follow those directions, so I went ahead and did it.
Now, later I found out that you can get your machine into an inconsistent state by installing things from both CPAN and yum repositories, and moreover apparently you can't even properly uninstall things that are installed by CPAN:
http://stackoverflow.com/questions/2626449/how-can-i-de-install-a-perl-modul... so by following directions to the letter which are repeated in thousands of sources, I apparently put my machine in a state that will cause frequent unpredictable conflicts with all the things installed by the system package manager, and the damage is irreversible.
Is that about right? :)
At about the same time I learned not to use CPAN, the person helping me solve the current problem said that I could make the run-time errors go away by going into CPAN and install Math::BigInt -- which led to a new error, getting "Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::Calc at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DH.pm line 6", so then I installed Math::BigInt::Pari through CPAN and it fixed the problem. I had to use CPAN because it was the only solution he knew and it was an emergency to get that error fixed.
So, going forward, to mitigate the damage, should I just take all the packages that are currently only listed as installed on the old machine, truncate the version number (so e.g. truncate "perl-Compress-Raw-Zlib-2.052-1.el5.rf" to just "perl-Compress-Raw-Zlib2") and install that with yum on the command line? (Thanks for that list, by the way.)
And more generally, what is the best practice if I want to install a module like Crypt::Twofish that was not in the default yum repositories, if John and C.L. are saying to avoid CPAN, and both John and Tom are saying to avoid adding extra yum repositories? I'd like to use yum just for consistency since it automatically handles dependencies and such, and at least if I always use yum, then yum will always be "aware" of what's installed already (as opposed to things installed from CPAN).
Bennett
I would work to bring the new machine's perl environment as close to that of the old
machine's.
Indeed, perl-Net-SFTP package is only installed on the new machine!
Your package output is reformatted here. Work through this to bring your
environments as close as
possible and check if you have used CPAN to install packages in the past.
$ diff -yW80 /tmp/oldlist /tmp/newlist perl-5.8.8-41.el5 perl-5.8.8-41.el5 perl-Compress-Raw-Bzip2-2.052-1.el5.r | perl-Class-Loader-2.03-1.2.el5.rf perl-Compress-Raw-Zlib-2.052-1.el5.rf | perl-Compress-Zlib-1.42-1.fc6 perl-Convert-ASN1-0.22-1.el5.rf |
perl-Convert-ASCII-Armour-1.4-1.2.el5
perl-Crypt-SSLeay-0.57-3.el5.rf | perl-Convert-ASN1-0.20-1.1 perl-DBD-mysql-4.014-1.el5.rf | perl-Convert-PEM-0.07-1.2.el5.rf perl-DBI-1.615-1.el5.rf | perl-Crypt-CBC-2.30-1.el5.rf
perl-Crypt-DES-2.05-3.2.el5.rf perl-Crypt-DH-0.06-1.2.el5.rf perl-Crypt-DSA-1.16-1.el5.rf perl-Crypt-IDEA-1.08-1.el5.rf
perl-Crypt-Primes-0.50-1.2.el5.rf
perl-Crypt-RSA-1.99-1.el5.rf
perl-Crypt-Random-1.25-1.2.el5.rf
perl-Crypt-Twofish-2.13-1.el5.rf perl-DBD-MySQL-3.0007-2.el5 perl-DBI-1.52-2.el5 perl-Data-Buffer-0.04-1.2.el5.rf
perl-Digest-HMAC-1.01-15 perl-Digest-HMAC-1.01-15
perl-Digest-MD2-2.03-1.2.el5.rf
perl-Digest-SHA1-2.11-1.2.1 perl-Digest-SHA1-2.11-1.2.1 perl-Email-Date-Format-1.002-1.el5.rf | perl-File-Which-1.09-1.el5.rf perl-Expect-1.21-1.el5.rf | perl-IPC-Run3-0.043-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf | perl-Math-GMP-2.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf |
perl-Math-Pari-2.01080603-1.el5.rf
perl-HTTP-Server-Simple-0.43-1.el5.rf | perl-Net-SFTP-0.10-1.el5.rf perl-IO-Compress-2.030-2.el5.rf | perl-Net-SSH-Perl-1.34-1.el5.rf perl-IO-Socket-SSL-1.01-2.el5 | perl-Probe-Perl-0.01-1.el5.rf perl-IO-Tty-1.08-2.el5.rf | perl-Sort-Versions-1.5-1.2.el5.rf perl-LWP-UserAgent-Determined-1.04-1. | perl-String-CRC32-1.4-2.fc6 perl-MIME-Lite-3.029-1.el5.rf | perl-Test-Script-1.05-1.el5.rf perl-Net-DNS-0.59-3.el5 |
perl-Tie-EncryptedHash-1.24-1.el5.rf
perl-Net-Daemon-0.43-1.el5.rf < perl-Net-IP-1.25-2.fc6 < perl-Net-SSLeay-1.36-1.el5.rf < perl-Net-Telnet-3.03-5 < perl-PlRPC-0.2020-1.el5.rf < perl-Sub-Uplevel-0.2002-1.el5.rf < perl-Test-Mock-LWP-0.05-1.el5.rf < perl-Test-MockObject-1.09-1.el5.rf < perl-Test-Warn-0.22-1.el5.rf < perl-Tree-DAG_Node-1.06-1.el5.rf < perl-UNIVERSAL-can-1.16-1.el5.rf < perl-UNIVERSAL-isa-1.03-1.el5.rf < perl-URI-1.35-3 perl-URI-1.35-3 perl-WWW-Mechanize-1.72-1.el5.rf < perl-XML-LibXML-1.70-2.el5.rf < perl-XML-NamespaceSupport-1.11-1.el5. < perl-XML-SAX-0.96-1.el5.rf < perl-libwww-perl-5.805-1.1.1 < perl-suidperl-5.8.8-41.el5 perl-suidperl-5.8.8-41.el5
CentOS mailing list CentOS@centos.org (mailto:CentOS@centos.org) http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org (mailto:CentOS@centos.org) http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org (mailto:CentOS@centos.org) http://lists.centos.org/mailman/listinfo/centos
Mmm, top posting. I'd rather not do it but....
What I describe does not pollute the base install, and using a container seems over the top.
Cheers,
Cliff
On Wed, Apr 2, 2014 at 12:50 PM, Daniel Condomitti daniel@condomitti.com wrote:
Have you thought of doing this in a Linux container to avoid tainting the base install?
On Tuesday, April 1, 2014 at 4:40 PM, Cliff Pratt wrote:
Another approach used by people who want to use CPAN a lot, is to
download
and install Perl from source to say /usr/local, and point CPAN at that. That way you get the benefits of the latest Perl and CPAN without it fighting with yum/rpm.
Your hashbang line in each Perl script that uses the alternate version of Perl would have to reflect the location of the alternate version of Perl and you would have to source any prerequisite Perl modules from CPAN,
which
is another chamber of hell.
But it does avoid issues like you are having.
Cheers,
Cliff
On Tue, Apr 1, 2014 at 9:04 PM, Bennett Haselton <bennett@peacefire.org(mailto:
bennett@peacefire.org)>wrote:
On 3/31/2014 10:42 PM, Tom Robinson wrote:
On 01/04/14 16:19, Bennett Haselton wrote:
On 3/31/2014 7:56 PM, Tom Robinson wrote:
Can you verify to which packages thefiles belong?
Try using RPM:
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Net/IP.pm
On the old machine: perl-Net-IP-1.25-2.fc6
and
rpm -qf /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DSA/KeyChain.pm
On the new machine: perl-Crypt-DSA-1.16-1.el5.rf
That should be a good starting point. Your check on installed
packages
as preposed by John shows two
very different packaged environments. Did you ever use CPAN on the
old
or new machine? Yes, on both. I needed it because I needed to install Crypt::Twofish and it didn't seem to be available from the default repositories used
by
yum but it was available from CPAN.
Because there were dozens of sources that I read, plus probably thousands of others that I didn't read, saying that installing from
CPAN
was a way to install Perl modules, I figured it was reasonably safe to follow those directions, so I went ahead and did it.
Now, later I found out that you can get your machine into an inconsistent state by installing things from both CPAN and yum repositories, and moreover apparently you can't even properly uninstall things that are installed by CPAN:
http://stackoverflow.com/questions/2626449/how-can-i-de-install-a-perl-modul...
so by following directions to the letter which are repeated in
thousands
of sources, I apparently put my machine in a state that will cause frequent unpredictable conflicts with all the things installed by the system package manager, and the damage is irreversible.
Is that about right? :)
At about the same time I learned not to use CPAN, the person helping me solve the current problem said that I could make the run-time errors go away by going into CPAN and install Math::BigInt -- which led to a new error, getting "Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::Calc at /usr/lib/perl5/vendor_perl/5.8.8/Crypt/DH.pm line 6", so then I installed Math::BigInt::Pari through CPAN and it fixed the problem. I had to use CPAN because it was the only solution he knew and it was an emergency to get that error fixed.
So, going forward, to mitigate the damage, should I just take all the packages that are currently only listed as installed on the old
machine,
truncate the version number (so e.g. truncate "perl-Compress-Raw-Zlib-2.052-1.el5.rf" to just "perl-Compress-Raw-Zlib2") and install that with yum on the command line? (Thanks for that list, by the way.)
And more generally, what is the best practice if I want to install a module like Crypt::Twofish that was not in the default yum
repositories,
if John and C.L. are saying to avoid CPAN, and both John and Tom are saying to avoid adding extra yum repositories? I'd like to use yum just for consistency since it automatically handles dependencies and such, and at least if I always use yum, then yum will always be "aware" of what's installed already (as opposed to things installed from CPAN).
Bennett
I would work to bring the new machine's perl environment as close to that of the
old
machine's.
Indeed, perl-Net-SFTP package is only installed on the new machine!
Your package output is reformatted here. Work through this to bring
your
environments as close as
possible and check if you have used CPAN to install packages in the
past.
$ diff -yW80 /tmp/oldlist /tmp/newlist perl-5.8.8-41.el5 perl-5.8.8-41.el5 perl-Compress-Raw-Bzip2-2.052-1.el5.r |
perl-Class-Loader-2.03-1.2.el5.rf
perl-Compress-Raw-Zlib-2.052-1.el5.rf | perl-Compress-Zlib-1.42-1.fc6 perl-Convert-ASN1-0.22-1.el5.rf |
perl-Convert-ASCII-Armour-1.4-1.2.el5
perl-Crypt-SSLeay-0.57-3.el5.rf | perl-Convert-ASN1-0.20-1.1 perl-DBD-mysql-4.014-1.el5.rf | perl-Convert-PEM-0.07-1.2.el5.rf perl-DBI-1.615-1.el5.rf | perl-Crypt-CBC-2.30-1.el5.rf
perl-Crypt-DES-2.05-3.2.el5.rf perl-Crypt-DH-0.06-1.2.el5.rf perl-Crypt-DSA-1.16-1.el5.rf perl-Crypt-IDEA-1.08-1.el5.rf
perl-Crypt-Primes-0.50-1.2.el5.rf
perl-Crypt-RSA-1.99-1.el5.rf
perl-Crypt-Random-1.25-1.2.el5.rf
perl-Crypt-Twofish-2.13-1.el5.rf perl-DBD-MySQL-3.0007-2.el5 perl-DBI-1.52-2.el5 perl-Data-Buffer-0.04-1.2.el5.rf
perl-Digest-HMAC-1.01-15 perl-Digest-HMAC-1.01-15
perl-Digest-MD2-2.03-1.2.el5.rf
perl-Digest-SHA1-2.11-1.2.1 perl-Digest-SHA1-2.11-1.2.1 perl-Email-Date-Format-1.002-1.el5.rf | perl-File-Which-1.09-1.el5.rf perl-Expect-1.21-1.el5.rf | perl-IPC-Run3-0.043-1.el5.rf perl-HTML-Parser-3.68-1.el5.rf | perl-Math-GMP-2.05-1.el5.rf perl-HTML-Tagset-3.20-1.el5.rf |
perl-Math-Pari-2.01080603-1.el5.rf
perl-HTTP-Server-Simple-0.43-1.el5.rf | perl-Net-SFTP-0.10-1.el5.rf perl-IO-Compress-2.030-2.el5.rf | perl-Net-SSH-Perl-1.34-1.el5.rf perl-IO-Socket-SSL-1.01-2.el5 | perl-Probe-Perl-0.01-1.el5.rf perl-IO-Tty-1.08-2.el5.rf | perl-Sort-Versions-1.5-1.2.el5.rf perl-LWP-UserAgent-Determined-1.04-1. | perl-String-CRC32-1.4-2.fc6 perl-MIME-Lite-3.029-1.el5.rf | perl-Test-Script-1.05-1.el5.rf perl-Net-DNS-0.59-3.el5 |
perl-Tie-EncryptedHash-1.24-1.el5.rf
perl-Net-Daemon-0.43-1.el5.rf < perl-Net-IP-1.25-2.fc6 < perl-Net-SSLeay-1.36-1.el5.rf < perl-Net-Telnet-3.03-5 < perl-PlRPC-0.2020-1.el5.rf < perl-Sub-Uplevel-0.2002-1.el5.rf < perl-Test-Mock-LWP-0.05-1.el5.rf < perl-Test-MockObject-1.09-1.el5.rf < perl-Test-Warn-0.22-1.el5.rf < perl-Tree-DAG_Node-1.06-1.el5.rf < perl-UNIVERSAL-can-1.16-1.el5.rf < perl-UNIVERSAL-isa-1.03-1.el5.rf < perl-URI-1.35-3 perl-URI-1.35-3 perl-WWW-Mechanize-1.72-1.el5.rf < perl-XML-LibXML-1.70-2.el5.rf < perl-XML-NamespaceSupport-1.11-1.el5. < perl-XML-SAX-0.96-1.el5.rf < perl-libwww-perl-5.805-1.1.1 < perl-suidperl-5.8.8-41.el5 perl-suidperl-5.8.8-41.el5
CentOS mailing list CentOS@centos.org (mailto:CentOS@centos.org) http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org (mailto:CentOS@centos.org) http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org (mailto:CentOS@centos.org) http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos