Re: upgrade broke perl?
by aitap (Curate) on Jan 30, 2013 at 20:11 UTC
|
Try cleaning up perl directories in /usr/local: ubuntu-packaged Perl is installed with /usr prefix, and CPAN is installing everything with /usr/local prefix by default, so you should get your system Perl back if you delete the modules installed in /usr/local/ (Perl searches for its data in /usr/local before /usr).
By the way, if you want to install a newer Perl version, it might be better to use perlbrew or perlall.
Edit: minor spelling corrections
Sorry if my advice was wrong.
| [reply] |
|
| [reply] |
Re: upgrade broke perl?
by jfroebe (Parson) on Jan 30, 2013 at 20:24 UTC
|
IMHO Unless you really need to modify the system Perl installation, I would recommend using Perl Brew instead.
| [reply] |
Re: upgrade broke perl?
by tobias_hofer (Friar) on Jan 30, 2013 at 19:51 UTC
|
Hello Joe,
IMHO it seems that the Perl includepath @INC contains mixed
paths of both perl libraries. The old 5.10.1 and the new 5.14.2.
However, Perl is not able to resolve the dependency tho the module feature.pm, which must be located in some of the folders.
Depending on what version you will get by typing perl -v on the shell, I would give a try doing following things to get the do-release-upgradeworking.
Create a perl-file from which you will start the do-release-upgrade i.e. UpdateMe.pl. Depending on your perl version I would manipulate the @INC path accordingly.
In case of Version 5.10.1 :
We have to replace following paths in the @INC: /usr/share/perl/5.14.2/etc/perl by /usr/share/perl/5.10.1/etc/perl
You can do this by simply manipulating the @INC.
As the wrong entry is at the first place you can remove it by an shift operation and unshift the correct path.
Like this:
#adjusting the @INC
shift(@INC);
unshift(@INC,'/usr/share/perl/5.10.1/etc/perl');
#Call to your script
qx(do-release-upgrade);
In case your are running the perl 5.14.2, you got to replace all the other paths pointing to version 5.10.1.
For this I would recommend some reg-expressions.
Or to keep it simple you can redefine the @INC by
@INC = ('/usr/share/perl/5.14.2','/etc/perl /usr/local/lib/perl/5.14.1
+','/usr/local/share/perl/5.14.2','/usr/lib/perl5','/usr/share/perl5',
+'/usr/lib/perl/5.14','/usr/share/perl/5.14','/usr/local/lib/site_perl
+','/opt');
But first make sure that those folders exists at all.
However, I am not sure if a do-release-upgrade is the correct answer to this issue - I have some doubts.
I am no ubuntu expert, but it should be possible to reinstall perl as 'ubuntu package' or rpm or something like that. I guess this approach would fit more this Issue. In case that ubuntu install scripts are perl based you can use the approach above eitherway.
I hope this helps.. :-)
Best regards
Tobias
| [reply] [d/l] [select] |
Re: upgrade broke perl?
by scorpio17 (Canon) on Jan 30, 2013 at 19:22 UTC
|
I'd suggest using the Ubuntu package manager.
Type this at the command line:
sudo apt-get update && sudo apt-get install perl
| [reply] [d/l] |
|
It sounds like eppo has broken the perl install on his system too much for that to work.
As others have said, it is usualy not a good idea to modify the system perl install. This applies double on Debian derived distros such as Ubuntu, because the system package manager uses perl internaly, so if you break perl you are likey to break the whole system to the point that it is impossible to re-install perl (or anything else), forcing you to re-instal the whole system to get it working again.
| [reply] |
Re: upgrade broke perl?
by eppo (Novice) on Jan 30, 2013 at 19:31 UTC
|
when I try to update ubuntu, it tells me that i have unmet dependencies, and to run apt-get -f install, when i do that, i get this:
debconf: Perl may be unconfigured (Can't locate feature.pm in @INC (@I
+NC contains: /usr/share/perl/5.14.2/ /etc/perl /usr/local/lib/perl/5.
+10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /us
+r/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /
+usr/local/share/perl/5.10.1/Text/Tabs.pm line 15.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/Text
+/Tabs.pm line 15.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/Text
+/Tabs.pm line 15.
Compilation failed in require at /usr/local/share/perl/5.10.1/Text/Wra
+p.pm line 35.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/Text
+/Wrap.pm line 35.
Compilation failed in require at /usr/share/perl5/Debconf/Template.pm
+line 10.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Template
+.pm line 10.
Compilation failed in require at /usr/share/perl5/Debconf/Question.pm
+line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Question
+.pm line 8.
Compilation failed in require at /usr/share/perl5/Debconf/Config.pm li
+ne 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.p
+m line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line
+10.
Compilation failed in require at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
Setting up libpam0g (1.1.3-7ubuntu2) ...
Can't locate feature.pm in @INC (@INC contains: /usr/share/perl/5.14.2
+/ /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /
+usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.1
+0 /usr/local/lib/site_perl .) at /usr/local/share/perl/5.10.1/Text/Ta
+bs.pm line 15.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/Text
+/Tabs.pm line 15.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/Text
+/Tabs.pm line 15.
Compilation failed in require at /usr/local/share/perl/5.10.1/Text/Wra
+p.pm line 35.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/Text
+/Wrap.pm line 35.
Compilation failed in require at /usr/share/perl5/Debconf/Template.pm
+line 10.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Template
+.pm line 10.
Compilation failed in require at /usr/share/perl5/Debconf/Question.pm
+line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Question
+.pm line 8.
Compilation failed in require at /usr/share/perl5/Debconf/Config.pm li
+ne 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.p
+m line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line
+10.
Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7
+.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm li
+ne 7.
Compilation failed in require at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line
+6.
dpkg: error processing libpam0g (--configure):
subprocess installed post-installation script returned error exit sta
+tus 2
Errors were encountered while processing:
libpam0g
E: Sub-process /usr/bin/dpkg returned an error code (1)
any idea on how to fix this?
thanks for your help.
Joe | [reply] [d/l] |
Re: upgrade broke perl?
by eppo (Novice) on Jan 30, 2013 at 20:18 UTC
|
I removed the reference to the perl 5.14.2 in @INC, and i'm still getting the same errors.
the file feature.pm does not exist on my system.
is there a way to install it without using cpan?
| [reply] |
|
| [reply] |
Re: upgrade broke perl?
by Argel (Prior) on Jan 31, 2013 at 19:42 UTC
|
So as a post-mortem of sorts, what possessed you to upgrade the OS installed Perl? It seems like a blind spot that even veteran system engineers and system administrators fall pray to, so I'm always a bit curious when things like this happen.
FWIW, as a general rule it's best to leave what the OS ships with alone as much as possible. Sorry you had to find that out the hard way. :/
| [reply] |
|
You're just some end user that doesn't understand security by any shape or means right? Not someone that runs something high profile... This is the exact crap that the high level companies getting hacked seem to run by, then wonder why people are slightly annoyed when they lose 70million customer details rfom their db including unsalted passwords and credit card details...
| [reply] |
|
Nonsense -- when you upgrade, be ready to roll back any updates that break your stuff -- or be ready to fix your broken stuff -- if you're not ready for rollback or fixing, then an upgrade doesn't get you anything
| [reply] |
Re: upgrade broke perl?
by glenlee (Initiate) on May 20, 2014 at 05:02 UTC
|
I'm not going to get into a debate on what should or shouldn't be done. I have a working Debian system using the latest perl releases, and I'm current on the latest aptitude releases as well. I had to do the following:
cd /usr/local/lib/perl5/site_perl
ln -s /usr/share/perl5/Debian Debian
ln -s /usr/share/perl5/DebianLinux.pm DebianLinux.pm
ln -s /usr/share/perl5/DebianNet.pm DebianNet.pm
cpanm Net::DNS
cpanm NetAddr:IP
cpanm HTML::Parser
Simply: any module that starts with "Deb" I ln -s to the /usr/local/lib/perl5/site_perl directory. And any error message during aptitude install/upgrade whatever that indicated a missing pm I followed with cpanm whatever::module.
We're good. | [reply] [d/l] [select] |
Re: upgrade broke perl?
by JoseSA (Initiate) on Jul 02, 2013 at 16:11 UTC
|
I had a similar problem and followed a different path: in my virtual Mint 15 I installed a new perl (5.14.4) over the native perl 5.14.2 and apt-get started throwing errors, mainly...
...dont't find ... Debconf/Db.pm in @INC ...
So @INC has lost the directory which holds that pm, but it (and other pms) were still in the system.
Solution: find Db.pm
find . -name Db.pm -print
>>>/usr/share/perl5/Debconf/Db.pm
Then I go to one of the dirs in current @INC and create a symlink
cd /usr/lib/perl5/site_perl/5.14.4/
ln -s /usr/share/perl5/Debconf Debconf
'et voila', I managed to upgrade flawlessly, apt-get is working
apt-get update
apt-get upgrade
Don't know if it would work if both perl major versions were different (here is 5.14 for both). | [reply] |
Re: upgrade broke perl?
by thecurio (Initiate) on Oct 11, 2013 at 15:24 UTC
|
I had the same issue whilst upgrading Debian Squeeze to Wheezy. What worked for me was to simply copy /usr/share/perl/5.10.1/feature.pm from another Squeeze system to the same location on the problem system.
A bit of a hack, but it got me past the broken upgrade. | [reply] [d/l] |
Re: upgrade broke perl?
by vsespb (Chaplain) on Oct 14, 2013 at 12:15 UTC
|
That's a bit not related, but imho, do-release-upgrade in 10.04 is totaly broken, so it not worth fixing perl
I tried it on just-installed brand new ubuntu 10.04 desktop - it failed. (however it worked fine when I logged out from GUI - still a bug, I did not receive any notice that I must shutdown GUI)
I tried it on my real 10.04 (without GUI), and of course I ended up with complete reinstall (I've got lots of funny messages - like "unknown version Ubuntu 12.04", "wrong GCC version", "cannot compile kernel", "there were some errors - exit or continue")
Perhaps for server distribution it works better, but for GUI it just don't work unless you did not touch anything (did not edit configs, did not workaround bugs, did not install software from source, etc) in the system after install
| [reply] |