NOsen
Posts: 9
Joined: Wed Feb 06, 2013 11:08 pm

Jessie lite apt-get issues

Wed Jan 13, 2016 7:59 pm

I cant install any pkgs at all i get this error over and over

i tested on 2 brand new RPI2 and i tested 3 diffrent NEW memory cards

anyhow this is the "error" i get

Code: Select all

sudo apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libgpm2 vim-runtime
Suggested packages:
  gpm ctags vim-doc vim-scripts
The following NEW packages will be installed:
  libgpm2 vim vim-runtime
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,892 kB of archives.
After this operation, 28.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgpm2 armhf 1.20.4-6.1 [35.1 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main vim-runtime all 2:7.4.488-7 [5,047 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main vim armhf 2:7.4.488-7 [809 kB]
Fetched 5,892 kB in 1min 25s (68.6 kB/s)
Unquoted string "of" may clash with future reserved word at /usr/share/perl/5.20/Carp.pm line 3.
debconf: Perl may be unconfigured (syntax error at /usr/share/perl/5.20/Carp.pm line 3, near "of
# inheritance are less efficient.
sub trusts "
syntax error at /usr/share/perl/5.20/Carp.pm line 20, near "}"
BEGIN not safe after errors--compilation aborted at /usr/share/perl/5.20/Carp.pm line 25.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/Handle.pm line 6.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/Handle.pm line 6.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 11.
Compilation failed in require at /usr/share/perl/5.20/FileHandle.pm line 9.
Compilation failed in require at (eval 1) line 3.
BEGIN failed--compilation aborted at (eval 1) line 3.
) -- aborting
Selecting previously unselected package libgpm2:armhf.
dpkg: unrecoverable fatal error, aborting:
 files list file for package `sudo' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)
any ideas?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5371
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Jessie lite apt-get issues

Wed Jan 13, 2016 8:03 pm

What does 'df -h' say?

NOsen
Posts: 9
Joined: Wed Feb 06, 2013 11:08 pm

Re: Jessie lite apt-get issues

Wed Jan 13, 2016 8:07 pm

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 15G 885M 13G 7% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 6.2M 457M 2% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p1 60M 20M 41M 34% /boot

User avatar
jackokring
Posts: 815
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: Jessie lite apt-get issues

Wed Jan 13, 2016 8:12 pm

looks like the output is due to the 'vim' package, having a bad script in. (This is an educated guess). Did you update and upgrade first?
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

NOsen
Posts: 9
Joined: Wed Feb 06, 2013 11:08 pm

Re: Jessie lite apt-get issues

Wed Jan 13, 2016 8:16 pm

yes update and upgrade works but after that all apt-get fails
like this trying to install alpine

Code: Select all

 sudo apt-get install alpine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  alpine-doc mlock
Suggested packages:
  aspell mail-transport-agent exim4
The following NEW packages will be installed:
  alpine alpine-doc mlock
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,871 kB of archives.
After this operation, 7,239 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main mlock armhf 8:2007f~dfsg-4 [33.0 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main alpine armhf 2.11+dfsg1-3 [1,488 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main alpine-doc all 2.11+dfsg1-3 [350 kB]
Fetched 1,871 kB in 39s (47.0 kB/s)
Unquoted string "of" may clash with future reserved word at /usr/share/perl/5.20/Carp.pm line 3.
debconf: Perl may be unconfigured (syntax error at /usr/share/perl/5.20/Carp.pm line 3, near "of
# inheritance are less efficient.
sub trusts "
syntax error at /usr/share/perl/5.20/Carp.pm line 20, near "}"
BEGIN not safe after errors--compilation aborted at /usr/share/perl/5.20/Carp.pm line 25.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/Handle.pm line 6.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/Handle.pm line 6.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 11.
Compilation failed in require at /usr/share/perl/5.20/FileHandle.pm line 9.
Compilation failed in require at (eval 1) line 3.
BEGIN failed--compilation aborted at (eval 1) line 3.
) -- aborting
Selecting previously unselected package mlock.
dpkg: unrecoverable fatal error, aborting:
 files list file for package `sudo' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

User avatar
rpdom
Posts: 12948
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Jessie lite apt-get issues

Wed Jan 13, 2016 8:22 pm

That looks like file system corruption of some sort.

Were the SD cards all the same type, or were they different?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5371
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Jessie lite apt-get issues

Wed Jan 13, 2016 8:26 pm

Very strange. I've just installed vim without any problems, but that doesn't really help you.

Any overclocking or fancy kernels (rpi-update?)... anything else that might be of interest in config.txt?

Are all the sd cards you've tried from the same source or the same brand?

User avatar
jackokring
Posts: 815
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: Jessie lite apt-get issues

Wed Jan 13, 2016 8:39 pm

The beginning of the file Carp.pm of the initial error is as follows, and a search shows 'of' is not used outside comments on my local debian linux box.

Code: Select all

package Carp;

{ use 5.006; }
use strict;
use warnings;
BEGIN {
    # Very old versions of warnings.pm load Carp.  This can go wrong due
    # to the circular dependency.  If warnings is invoked before Carp,
    # then warnings starts by loading Carp, then Carp (above) tries to
    # invoke warnings, and gets nothing because warnings is in the process
    # of loading and hasn't defined its import method yet.  If we were
    # only turning on warnings ("use warnings" above) this wouldn't be too
    # bad, because Carp would just gets the state of the -w switch and so
    # might not get some warnings that it wanted.  The real problem is
    # that we then want to turn off Unicode warnings, but "no warnings
    # 'utf8'" won't be effective if we're in this circular-dependency
    # situation.  So, if warnings.pm is an affected version, we turn
    # off all warnings ourselves by directly setting ${^WARNING_BITS}.
    # On unaffected versions, we turn off just Unicode warnings, via
    # the proper API.
    if(!defined($warnings::VERSION) || eval($warnings::VERSION) < 1.06) {
	${^WARNING_BITS} = "";
    } else {
	"warnings"->unimport("utf8");
    }
}
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

NOsen
Posts: 9
Joined: Wed Feb 06, 2013 11:08 pm

Re: Jessie lite apt-get issues

Wed Jan 13, 2016 8:41 pm

Well the wierd part is as long as i do not run apt-get upgrade i can install any pkg w/o any errors
after i run apt-get upgrade no more so i really dont understand why the upgrade would corupt my filesystem?

User avatar
jackokring
Posts: 815
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: Jessie lite apt-get issues

Wed Jan 13, 2016 8:55 pm

So assuming an update without an upgrade will leave you able, (very likely, although depends if distribution servers change), then the upgrade must be upgrading apt-get, perl or a dependency. is it possible to say n to the upgrade, but print the list of packages it wants to upgrade?

Either that or some other computational or logical failure has occurred.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

NOsen
Posts: 9
Joined: Wed Feb 06, 2013 11:08 pm

Re: Jessie lite apt-get issues

Thu Jan 14, 2016 1:33 pm

Well i have no idea on the ods but i sure wish i would had played a few bucks on it... i got 2 broken RPI2...
i tested the none working sdcards in a rpi2 i have had running for awhile and there is no issues there at all.

NOsen
Posts: 9
Joined: Wed Feb 06, 2013 11:08 pm

Re: Jessie lite apt-get issues

Fri Jan 15, 2016 4:49 pm

Scratch the above...

i went to the store today picked up yet another new RPI2 and a sdcard

Exakt same error on this one !

So i did a test run with wheezy and it all works there.... it has to be a bad perl-package on Jessie lite distro couse its after the perl gets updated it all goes down the toilet.

sofixa
Posts: 2
Joined: Fri Jun 10, 2016 10:51 am

Re: Jessie lite apt-get issues

Fri Jun 10, 2016 11:27 am

Same problem here. A Raspberry Pi 3 B+ with an 16 GB Kingston Micro SD card, running Rasbpian Jessie installed with NOOBS v1.9.1.
Whenever i try to install something i get this:

Code: Select all

[email protected]:/home/pi# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  vim-runtime
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-runtime
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,857 kB of archives.
After this operation, 28.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main vim-runtime all 2:7.4.488-7 [5,047 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main vim armhf 2:7.4.488-7 [809 kB]
Fetched 5,857 kB in 1s (3,669 kB/s)
Unquoted string "of" may clash with future reserved word at /usr/share/perl/5.20/Carp.pm line 3.
debconf: Perl may be unconfigured (syntax error at /usr/share/perl/5.20/Carp.pm line 3, near "of
# inheritance are less efficient.
sub trusts "
syntax error at /usr/share/perl/5.20/Carp.pm line 20, near "}"
BEGIN not safe after errors--compilation aborted at /usr/share/perl/5.20/Carp.pm line 25.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/Handle.pm line 6.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/Handle.pm line 6.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 11.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 11.
Compilation failed in require at /usr/share/perl/5.20/FileHandle.pm line 9.
Compilation failed in require at (eval 1) line 3.
BEGIN failed--compilation aborted at (eval 1) line 3.
) -- aborting
dpkg: unrecoverable fatal error, aborting:
 unknown user 'package' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)
(after running apt-get update && apt-get upgrade upon first boot)

After a quick Google search i stumbled upon this on the Debian bugs thingy, and it seems similar:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=77247

But i am not sure i understand this part, which is marked as the solution:

Code: Select all

AFAIK, the only fix for this is disabling the perl alternatives mess,
which is already planned. I don't see that this is a debconf problem at
all; dependancies on perl-5.6-base should only be satisfied if perl
points to it; it is the current version of perl after all.
Funnily enough, in the same version of NOOBS, OSMC had a multitude of problems(upon first restart, systemd would fail miserably).

sofixa
Posts: 2
Joined: Fri Jun 10, 2016 10:51 am

Re: Jessie lite apt-get issues

Tue Jun 14, 2016 8:06 pm

Sooo anyone have any ideas? Unless i am running in a very specific case, Raspbian is basically unusable(an update screws it up).
Besides the Perl issues, i also had mtp fail, because libmtp-runtime is missing and my Pi won't boot; and i can't install it because apt-get doesn't work due to the bloody Perl issues.
I'll try to downgrade Perl and see if that helps.

User avatar
rpdom
Posts: 12948
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: Jessie lite apt-get issues

Tue Jun 14, 2016 8:26 pm

sofixa wrote:Sooo anyone have any ideas? Unless i am running in a very specific case, Raspbian is basically unusable(an update screws it up).
It seems you are running in a very specific case (or you have some other problem, which is more likely), otherwise there would have been a great many other people complaining about upgrades messing up their systems.

Usually a situation like this is caused by a bad SD card (corruption, fake or broken).

wouterds
Posts: 13
Joined: Wed Dec 31, 2014 5:16 pm

Re: Jessie lite apt-get issues

Fri Sep 16, 2016 7:25 pm

Any working fix?

I still have the same problem. Keeps occurring, even if I re-install the whole system on a different SD card.
I'm not sure when, it's starts happening after a random time.

About the following I did before it started to happen:
- clean install
- apt-get update
- apt-get dist-upgrade
- apt-get install git zsh screen

And that's about it. After that apt-get breaks and I can't install / remove anything anymore.

Code: Select all

debconf: Perl may be unconfigured (Can't find string terminator '"' anywhere before EOF at /usr/share/perl/5.20/warnings.pm line 355.
Compilation failed in require at /usr/share/perl/5.20/Carp.pm line 5.
BEGIN failed--compilation aborted at /usr/share/perl/5.20/Carp.pm line 5.
Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 8.
BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.20/IO/File.pm line 8.
Compilation failed in require at /usr/share/perl/5.20/FileHandle.pm line 9.
Compilation failed in require at (eval 1) line 3.
BEGIN failed--compilation aborted at (eval 1) line 3.
) -- aborting
dpkg: error processing package debconf (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration

wouterds
Posts: 13
Joined: Wed Dec 31, 2014 5:16 pm

Re: Jessie lite apt-get issues

Fri Sep 16, 2016 8:46 pm

Third time did a clean install with the jessie lite image.
Finally configured everything and everything is up to date..

Trying to install `htop` and out of nowhere it's broken again.

Code: Select all

➜  ~ sudo apt-get install htop
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  ltrace
The following NEW packages will be installed:
  htop
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 68.8 kB of archives.
After this operation, 135 kB of additional disk space will be used.
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main htop armhf 1.0.3-1 [68.8 kB]
Fetched 68.8 kB in 0s (148 kB/s)
debconf: Perl may be unconfigured (FileHandle.pm did not return a true value at (eval 1) line 3.
BEGIN failed--compilation aborted at (eval 1) line 3.
) -- aborting
Selecting previously unselected package htop.
(Reading database ... 33265 files and directories currently installed.)
Preparing to unpack .../htop_1.0.3-1_armhf.deb ...
Unpacking htop (1.0.3-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up htop (1.0.3-1) ...

hal8000
Posts: 187
Joined: Fri Oct 04, 2013 5:22 pm

Re: Jessie lite apt-get issues

Fri Sep 16, 2016 8:59 pm

Had the same problem on a fresh install of Jessie Lite on a Pi Model B (first version).
This is how I solved it. Comment out /etc/apt/sources.list with your favourite editor so it looks like:

Code: Select all

#deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
You can use nano which is installed by default,

Code: Select all

sudo nano /etc/apt/sources.list
Save the file and run apt-get update

Code: Select all

sudo apt-get update
Ignore any error messages, now delete the comment so its back to normal

Code: Select all

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
Save the file and run sudo apt-get update again.
Now try and install something, e.g.

sudo apt-get install htop

Return to “Troubleshooting”