[RESOLVED] Perl Issues like I've not seen before

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[RESOLVED] Perl Issues like I've not seen before

Postby linuxdad » Mar 28th, '16, 19:42

I am busy installing PSAD from Source, normally, I kick off the ./install.pl script, and I'm done. But not this time.

So the issue really comes up here:

Code: Select all
[root@ns3 ~]# /etc/init.d/psad start
Starting psad: Can't load '/root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/Date/Calc/Calc.so' for module Date::Calc: /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/Date/Calc/Calc.so: undefined symbol: DateCalc_Day_of_Week_to_Text_ at /usr/lib/perl5/5.20.1/x86_64-linux-thread-multi/DynaLoader.pm line 193.
 at /usr/sbin/psad line 3214.
Compilation failed in require at /usr/sbin/psad line 3214.



Unfortunately, it's taken a few days to identify the issue (even with the original developer contacting me back). What I see it the following:

Code: Select all
PERL5LIB="/root/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/root/perl5${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}";
 export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/root/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/root/perl5"; export PERL_MM_OPT;


In the .bashrc script. This is not expected, or desired, as I am trying to implement the same environment on the server, for anyone with Shell Access.

My Questions (since I have none of this on my other servers), who decided to implement this? Why? How do I go back to the previous method (which worked well for my needs. Just because everyone else jumped off of the bridge, doesn't mean I am going to).

The big concern I have (r I would just remove the entries), is the following:
Code: Select all
[root@ns3 ~]# ls /root/perl5/lib/perl5
5.16.0/  CPAN/      IPTables/  Mail/    Sub/
5.20.1/  Date/      lib/       Module/  Test/
Carp/    ExtUtils/  local/     POD2/    x86_64-linux-thread-multi/


What's the best way not to screw up the server, and maintain peace and harmony?

Thank you.
Last edited by linuxdad on Mar 31st, '16, 13:35, edited 1 time in total.
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: Perl Issues like I've not seen before

Postby doktor5000 » Mar 28th, '16, 21:47

You probably put it yourself there, or your cpan installation did it. As you don't mention how you added the cpan installation, can't help much. FWIW, I don't have that in my ~/.bashrc in my cauldron installs.
Code: Select all
[root@openqa_mga6 ~]# grep -i perl ~/.bashrc
[root@openqa_mga6 ~]#


And the proper way to build Mageia rpm packages from perl cpan modules would be the following, which creates normal rpm packages, does this as regular user, and not as root:
Code: Select all
urpmi perl-devel perl-CPANPLUS perl-CPANPLUS-Dist-Mageia
cpan2dist --format CPANPLUS::Dist::Mageia Date::Calc

See https://wiki.mageia.org/en/Perl_policy#Tools

Why didn't you just install perl-Date-Calc instead of runnign a cpan installation as root?
Code: Select all
[user@openqa_mga6]─[21:47:05]─[~] urpmq --whatprovides 'perl(Date::Calc)'
perl-Date-Calc|perl-Date-Calc
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Perl Issues like I've not seen before

Postby doktor5000 » Mar 28th, '16, 21:52

BTW, you already did the same mistake in the past (cpan root installation): viewtopic.php?f=8&t=6585
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Perl Issues like I've not seen before

Postby linuxdad » Mar 29th, '16, 17:00

Hey Doctor,

Thank you for the reply, it would appear that old habits die hard.

I appreciate the response, time to clean that server up.

Can I just delete the entries from the .bashrc script?

Thank you.
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: Perl Issues like I've not seen before

Postby doktor5000 » Mar 29th, '16, 17:21

linuxdad wrote:Can I just delete the entries from the .bashrc script?

I don't know if you can :) Just back up that .bashrc and remove that perl stuff. By default the bashrc is basically empty and only sources /etc/bashrc, take a look at /etc/skel/ to see the default one.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Perl Issues like I've not seen before

Postby linuxdad » Mar 31st, '16, 13:35

Resolved. Now why Can't I reformat the subject line??
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: [RESOLVED] Perl Issues like I've not seen before

Postby doktor5000 » Mar 31st, '16, 19:25

Erm, you did already? :p
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18057
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest