[CentOS] trouble installing Math::BigInt module

Bennett Haselton bennett at peacefire.org
Wed Apr 2 00:16:59 UTC 2014


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 at 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-module-installed-via-cpan
>> 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 at centos.org
>>> http://lists.centos.org/mailman/listinfo/centos
>> _______________________________________________
>> CentOS mailing list
>> CentOS at centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>
>
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos




More information about the CentOS mailing list