Koozali.org: home of the SME Server

Perl/CPAN Mess - How to Set Perl Back to Installation State?

Offline jfritz

  • *
  • 7
  • +0/-0
Perl/CPAN Mess - How to Set Perl Back to Installation State?
« on: March 13, 2009, 12:00:14 PM »
Hello to everybody!
I am currently testing SME Server 8.0beta3 for later productional use. For installing my preferred backup solution (dirvish) some perl modules were needed:

Getopt::Long
Time::ParseDate
Time::Period

Unfortunately I installed these modules via CPAN and not via yum:

Code: [Select]
# perl -MCPAN -e shell
 cpan> install Getopt::Long  Time::ParseDate  Time::Period

Now my perl installation is partially broken, e.g. the daily cronjob output:

Code: [Select]
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.8/Scalar/Util.pm line 30.
I want to set the perl installation back to default configuration (SME configuration) again, but I'm not very familiar to yum at all. This is my first Centos/RedHat based system and I'm usually working on Debian based systems.

Thanks for your help in advance!

Best regards, jfritz
« Last Edit: March 14, 2009, 11:38:35 AM by jfritz »

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #1 on: March 13, 2009, 12:47:44 PM »
Welcome to the forums.

CPAN is basically a wrapper around manual installation. Given that this is just  a test copy, perhaps a reinstall would be the quickest solution?

Offline jfritz

  • *
  • 7
  • +0/-0
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #2 on: March 13, 2009, 01:00:54 PM »
Thanks for your reply!

Considering the time I've already spent on this, you are absolutely right. But from my point of view this is a test install, which enables me to do testing and collecting knowledge on Centos/RedHat tools. This time: how to reset a package to default via yum.  :smile:



Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #3 on: March 13, 2009, 02:28:16 PM »
But from my point of view this is a test install, which enables me to do testing and collecting knowledge on Centos/RedHat tools.

So you've learnt a valuable lesson - don't install software which isn't rpm packaged.

yum and rpm are unable to remove software which they know nothing about. There's no simple way to fix your problem.

Please read the FAQ - I expect it warns you there against installing using the CPAN shell.

Offline jfritz

  • *
  • 7
  • +0/-0
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #4 on: March 13, 2009, 02:51:28 PM »
So you've learnt a valuable lesson - don't install software which isn't rpm packaged.

yum and rpm are unable to remove software which they know nothing about. There's no simple way to fix your problem.

Please read the FAQ - I expect it warns you there against installing using the CPAN shell.

Well, thanks again. Now I know about the possible troubles of using CPAN. Isn't there any similar call like Debian's "apt-get --purge remove $package" to remove a package and its entire configuration?

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #5 on: March 13, 2009, 03:03:58 PM »
Well, thanks again. Now I know about the possible troubles of using CPAN. Isn't there any similar call like Debian's "apt-get --purge remove $package" to remove a package and its entire configuration?

Sure, but you want to remove stuff which is not part of a package.

You can do:

rpm -e --nodeps perl

but then you will break a lot of things. Moreover, you won't remove everything you installed via the CPAN shell.

Stop wasting time and just do a fresh install. :-)



Offline jfritz

  • *
  • 7
  • +0/-0
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #6 on: March 14, 2009, 11:54:18 AM »
Finally I reinstalled. Thanks for your advice!

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #7 on: March 14, 2009, 01:34:47 PM »
I am currently testing SME Server 8.0beta3 for later productional use.
You are adviced not to do so as this is still beta and may contain (lots of) bugs. Defer your testing at least to the release candidate stage.

For installing my preferred backup solution (dirvish) some perl modules were needed:

Getopt::Long
Time::ParseDate
Time::Period
You can install those packages from one of the repositories I guess. I guess they might be in Dagor some other major repo. You can find out by doing a search on http://rpm.pbone.net. At least perl-Getopt-long is in Dag. The configuration for some major repositories are in the wiki: http://wiki.contribs.org/Category:Yum_Repository

« Last Edit: March 14, 2009, 01:37:30 PM by cactus »
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #8 on: March 14, 2009, 04:58:38 PM »
You are adviced not to do so as this is still beta and may contain (lots of) bugs. Defer your testing at least to the release candidate stage.

I disagree. If someone wishes later to use SME8 in production they should test it now. The more and earlier SME8 is tested, the better it is likely to be.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #9 on: March 14, 2009, 05:00:48 PM »
I guess they might be in Dag or some other major repo. You can find out by doing a search on http://rpm.pbone.net.

Easier is to enable the Dag repo, then do:

Code: [Select]
yum install 'perl(Getopt::Long)' 'perl(Time::ParseDate)' 'perl(Time::Period)'

Offline gzartman

  • *
  • 306
  • +0/-0
    • LEI Engineering & Surveying
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #10 on: March 27, 2009, 03:05:31 AM »
Moving thread to General Discussion as it is more appropriate there.
----
Greg J. Zartman
LEI Engineering & Surveying

SME user and community member since 2000.

Offline jfritz

  • *
  • 7
  • +0/-0
Re: Perl/CPAN Mess - How to Set Perl Back to Installation State?
« Reply #11 on: April 04, 2009, 10:31:38 AM »
After updating my previous test installation to Centos 5.3 (including some updated perl*.rpms) my Perl/CPAN-mess finally disappeared. No more errors, now all scripts are working fine again.