2

I know this has been asked many times before, i looked it up. But i haven't found a solution to my problem yet. If i try to update the Software Center it says my package system is broken.

Running

sudo apt-get -f install

says

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-image-4.2.0-18-generic
Suggested packages:
  fdutils linux-doc-4.2.0 linux-source-4.2.0 linux-tools
The following NEW packages will be installed:
  linux-image-4.2.0-18-generic
0 upgraded, 1 newly installed, 0 to remove and 32 not upgraded.
1 not fully installed or removed.
Need to get 0 B/17,3 MB of archives.
After this operation, 50,2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: Perl may be unconfigured (Can't locate re.pm in @INC (you may need to install the re module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl/5.20/Text/Wrap.pm line 58.
BEGIN failed--compilation aborted at /usr/share/perl/5.20/Text/Wrap.pm line 58.
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 line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.pm 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
(Reading database ... 218202 files and directories currently installed.)
Preparing to unpack .../linux-image-4.2.0-18-generic_4.2.0-18.22_amd64.deb ...
Can't locate re.pm in @INC (you may need to install the re module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /usr/share/perl/5.20/Text/Wrap.pm line 58.
BEGIN failed--compilation aborted at /usr/share/perl/5.20/Text/Wrap.pm line 58.
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 line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.pm 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 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/linux-image-4.2.0-18-generic_4.2.0-18.22_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.2.0-18-generic /boot/vmlinuz-4.2.0-18-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.2.0-18-generic /boot/vmlinuz-4.2.0-18-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.2.0-18-generic_4.2.0-18.22_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Help would be much appreciated. Thanks.

1
  • @Dooley_labs No, no and no. See my answer.
    – A.B.
    Commented Nov 20, 2015 at 19:06

1 Answer 1

1

The missing library is in perl-base. I hope you did not remove Perl from your system.

Because the package system is slightly broken, use an alternative way:

wget http://mirrors.kernel.org/ubuntu/pool/main/p/perl/perl-base_5.20.2-6_amd64.deb
sudo dpkg -i --force-all perl-base_5.20.2-6_amd64.deb
sudo apt-get install -f

Now check your path

perl -e "print qq(@INC)"

It should include

/usr/lib/x86_64-linux-gnu/perl/5.20.2/
2
  • I would have already if there wasn't a waiting time of 5 minutes^^
    – Johnnylame
    Commented Nov 20, 2015 at 19:06
  • wget http://mirrors.kernel.org/ubuntu/pool/main/p/perl/perl-base_5.26.1-5_amd64.deb is the latest as of today. Commented Mar 2, 2018 at 17:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .