Vladinator
Posts: 3
Joined: Sat Oct 29, 2016 9:46 am

perl error

Sat Oct 29, 2016 9:49 am

I'm getting the following after running `sudo apt-get -f dist-upgrade'

debconf: Perl may be unconfigured (Can't locate warnings/register.pm in @INC (you may need to install the warnings::register module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/arm-linux-gnueabihf/perl5/5.20 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl/5.20/vars.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl/5.20/vars.pm line 7.
Compilation failed in require at /usr/share/perl/5.20/base.pm line 4.
BEGIN failed--compilation aborted at /usr/share/perl/5.20/base.pm line 4.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Log.pm line 7.
Compilation failed in require at (eval 1) line 4.
BEGIN failed--compilation aborted at (eval 1) line 4.
) -- aborting
(Reading database ... 122197 files and directories currently installed.)
Preparing to unpack .../libc6_2.19-18+deb8u6_armhf.deb ...
Can't locate warnings/register.pm in @INC (you may need to install the warnings::register module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/arm-linux-gnueabihf/perl5/5.20 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl/5.20/vars.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl/5.20/vars.pm line 7.
Compilation failed in require at /usr/share/perl/5.20/base.pm line 4.
BEGIN failed--compilation aborted at /usr/share/perl/5.20/base.pm line 4.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Log.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 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 archive /var/cache/apt/archives/libc6_2.19-18+deb8u6_armhf.deb (--unpack):
subprocess new pre-installation script returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.19-18+deb8u6_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am unable to use apt at all without getting this error. I can't even launch a CPAN shell. Anyone know how to correct this?

Sean.fr
Posts: 10
Joined: Fri Mar 21, 2014 5:35 pm

Re: perl error

Mon Nov 21, 2016 7:46 pm

apt-get -f dist-upgrade is a very agressive way to upgrade the Pi.

That looks well broke. The best way to fix this, is to start again. Configure a new SD, and use then

apt-get update
apt--get upgrade

or better use the GUI - see preferences / add remove software. Install your apps.
You can mount the old SD on a USB port, so you can still copy your old data/configs/perl scripts. It comes up in the media folder.

To access CPAN - install cpanminus. It is in the add/remove software
However, before using cpanminus to get perl modules, check the module is not in the Raspbian depository.
Debian likes to add Lib onto the front of the name of perl packages...

If all else fails, perl is just a text script. So you can cut and paste the source from CPAN or your old SD...

Vladinator
Posts: 3
Joined: Sat Oct 29, 2016 9:46 am

Re: perl error

Mon Nov 21, 2016 7:52 pm

Cheers - thanks mate. I'll do exactly that.

User avatar
rpdom
Posts: 17029
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: perl error

Mon Nov 21, 2016 7:54 pm

Sean.fr wrote:apt-get -f dist-upgrade is a very agressive way to upgrade the Pi.
I agree. apt-get -y dist-upgrade is normally sufficient.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: perl error

Mon Nov 21, 2016 8:08 pm

Vladinator wrote:without getting this error. I can't even launch a CPAN shell. Anyone know how to correct this?
Is there free space on this sdcard? What did you do before you got this error? If you were deleting a bunch of things that matter, a certain level of perl does matter, you'll have troubles. Just "starting over" will mean you don't know what you did, unless you do know but didn't say.

Vladinator
Posts: 3
Joined: Sat Oct 29, 2016 9:46 am

Re: perl error

Mon Nov 21, 2016 8:13 pm

Yes, just prior to this error I ran the apt-get command specified above,

sudo apt-get -f dist-upgrade

Return to “Other programming languages”