User avatar
Erudite
Posts: 11
Joined: Sat Jul 11, 2015 8:18 am
Location: England, UK

Error Running sudo apt-get update

Sat Aug 27, 2016 10:50 am

Hi

I'm running into an issue when I try and update my Raspberry Pi.

I run:

Code: Select all

sudo apt-get update
To update the distribution lists on the Pi and then following error is returned:

Code: Select all

/usr/lib/apt/methods/https: error while loading shared libraries: /usr/lib/arm-linux-gnueabihf/libp11-kit.so.0: nonzero padding in e_ident
E: Method https has died unexpectedly!
E: Sub-process https returned an error code (127)
E: Method /usr/lib/apt/methods/https did not start correctly
I've tried reinstalling apt-transport-https using

Code: Select all

sudo apt-get install --reinstall apt-transport-https
But that hasn't worked. I also tried reinstalling it from archive; that didn't work either.

I've also tried checking

Code: Select all

/etc/apt/sources.list
to see if any of the lines contain https. The contents of that file is:

Code: Select all

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
There weren't any instances of 'https' and no quotes were used, so I just closed the file.

Can anyone help me update?!

plugwash
Forum Moderator
Forum Moderator
Posts: 3522
Joined: Wed Dec 28, 2011 11:45 pm

Re: Error Running sudo apt-get update

Sat Aug 27, 2016 10:58 am

Try

apt-get install --reinstall libp11-kit0

User avatar
Erudite
Posts: 11
Joined: Sat Jul 11, 2015 8:18 am
Location: England, UK

Re: Error Running sudo apt-get update

Sat Aug 27, 2016 11:03 am

plugwash wrote:Try

apt-get install --reinstall libp11-kit0

Hi plugwash,

That seems to have cleared up the initial error I was experiencing ...thank you!

Now I'm getting this block of problems when I run:

Code: Select all

sudo apt-get update

Response:

Code: Select all

sudo apt-get update
Get:1 http://mirrordirector.raspbian.org jessie InRelease [14.9 kB]
Get:2 http://archive.raspberrypi.org jessie InRelease [13.2 kB]                    
Err http://mirrordirector.raspbian.org jessie InRelease         
  
Err http://archive.raspberrypi.org jessie InRelease
  
Get:3 https://dev2day.de jessie InRelease
Get:4 https://dev2day.de jessie InRelease [1,789 B]
Err https://dev2day.de jessie InRelease
  
Fetched 29.9 kB in 1s (23.9 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://mirrordirector.raspbian.org jessie InRelease: Could not execute 'gpgv' to verify signature (is gpgv installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.raspberrypi.org jessie InRelease: Could not execute 'gpgv' to verify signature (is gpgv installed?)

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dev2day.de jessie InRelease: Could not execute 'gpgv' to verify signature (is gpgv installed?)

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/InRelease  

W: Failed to fetch https://dev2day.de/pms/dists/jessie/InRelease  

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/jessie/InRelease  

W: Some index files failed to download. They have been ignored, or old ones used instead.
Any idea how to clear this up?

Thanks again

plugwash
Forum Moderator
Forum Moderator
Posts: 3522
Joined: Wed Dec 28, 2011 11:45 pm

Re: Error Running sudo apt-get update

Sat Aug 27, 2016 11:46 am

What happens if you run

gpgv --help

User avatar
Erudite
Posts: 11
Joined: Sat Jul 11, 2015 8:18 am
Location: England, UK

Re: Error Running sudo apt-get update

Sat Aug 27, 2016 11:50 am

plugwash wrote:What happens if you run

gpgv --help
I get the following response:

Code: Select all

gpgv --help
gpgv (GnuPG) 1.4.18
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Syntax: gpgv [options] [files]
Check signatures against known trusted keys


Options:
 
 -v, --verbose                verbose
 -q, --quiet                  be somewhat more quiet
     --keyring                take the keys from this keyring
     --ignore-time-conflict   make timestamp conflicts only a warning
     --status-fd FD           write status info to this FD

Please report bugs to <[email protected]>.

plugwash
Forum Moderator
Forum Moderator
Posts: 3522
Joined: Wed Dec 28, 2011 11:45 pm

Re: Error Running sudo apt-get update

Sat Aug 27, 2016 12:05 pm

I was hoping for an error message that would give further clues to the problem :(

What do you get if you try

apt-key list

User avatar
Erudite
Posts: 11
Joined: Sat Jul 11, 2015 8:18 am
Location: England, UK

Re: Error Running sudo apt-get update

Sat Aug 27, 2016 12:12 pm

plugwash wrote:I was hoping for an error message that would give further clues to the problem :(

What do you get if you try

apt-key list
I was hoping for the same thing! But it appears to be working. I even tried reinstalling it and trying again; no changes.

Anyway, this is the response I get:

Code: Select all

sudo apt-key list
/etc/apt/trusted.gpg
--------------------
pub   2048R/90FDDD2E 2012-04-01
uid                  Mike Thompson (Raspberry Pi Debian armhf ARMv6+VFP) <[email protected]>
sub   2048R/5373DC6C 2012-04-01

pub   2048R/7FA3303E 2012-06-17
uid                  Raspberry Pi Archive Signing Key
sub   2048R/EDD83D6C 2012-06-17

pub   4096R/DC9666A8 2015-04-11
uid                  Jan Friedrich <[email protected]>
I really appreciate your helping with this :-)

plugwash
Forum Moderator
Forum Moderator
Posts: 3522
Joined: Wed Dec 28, 2011 11:45 pm

Re: Error Running sudo apt-get update

Sat Aug 27, 2016 1:11 pm

Can you try

wget http://archive.raspbian.org/raspbian/di ... ie/Release
wget http://archive.raspbian.org/raspbian/di ... elease.gpg

gpgv --keyring /etc/apt/trusted.gpg Release.gpg Release

User avatar
Erudite
Posts: 11
Joined: Sat Jul 11, 2015 8:18 am
Location: England, UK

Re: Error Running sudo apt-get update

Mon Aug 29, 2016 11:07 am

plugwash wrote:Can you try

wget http://archive.raspbian.org/raspbian/di ... ie/Release
wget http://archive.raspbian.org/raspbian/di ... elease.gpg

gpgv --keyring /etc/apt/trusted.gpg Release.gpg Release
Yes!!!! That seems to have fixed it. Distributions updated and upgraded without any problems! I wonder what I did to cause this in the first place?

Thank you so much for your help plugwash :) :D :mrgreen:

hugo_figueiredo
Posts: 13
Joined: Tue Jan 27, 2015 12:46 pm

Re: Error Running sudo apt-get update

Sat Jan 14, 2017 7:31 pm

plugwash wrote:Can you try

wget http://archive.raspbian.org/raspbian/di ... ie/Release
wget http://archive.raspbian.org/raspbian/di ... elease.gpg

gpgv --keyring /etc/apt/trusted.gpg Release.gpg Release
when i do these steps, appears to me this error
gpgv: Segmentation fault caught ... exiting
Segmentation fault

kkk
Posts: 1
Joined: Wed Mar 22, 2017 8:30 am

Re: Error Running sudo apt-get update

Wed Mar 22, 2017 8:33 am

Sorry for necroposting but this thread is the first to come up in Google so I want to add this to the discussion:

The errors you are seeing stem from a broken filesystem. To solve it:

Code: Select all

sudo touch /forcefsck
This will repair the filesystem upon reboot, and after that, unless your FS is really really in bad shape, everything should work fine.

This will only do it once. I've found that you might want to edit /boot/cmdline.txt and add "forcefsck" at the end of the line to have it on each reboot.

Rpis really have a problem with data corruption… (but we still love'em ;))

DaBzzz
Posts: 1
Joined: Sat Dec 22, 2018 1:07 pm

Re: Error Running sudo apt-get update

Sun Dec 23, 2018 9:58 pm

Well, not quite...

Code: Select all

sudo gpgv -v --keyring /etc/apt/trusted.gpg Release.gpg Release
gpgv: armor header: Version: GnuPG v2
gpgv: Signature made Sat 22 Dec 2018 11:15:17 CET
gpgv:                using RSA key 9165938D90FDDD2E

gpgv: signal Segmentation fault caught ... exiting
Segmentation fault
I've noticed some encoding crap in python files in the /usr dir and I've removed quite a lot of components to dig deeper into the problem.

Code: Select all

sudo apt-get install gpgv --reinstall
Also does not help, so it's probably not a fault in gpgv itself.

As the file system should be okay after the forced fsck, I went ahead and upgraded from jessie to stretch.

Upgrade went smooth, only errors were

Code: Select all

gtk-update-icon-cache: The generated cache was invalid.
WARNING: icon cache generation failed
and

Code: Select all

Warning: mailcap line not starting with a media type in vim-common
Problematic line: t%xt/plain3 riew %s; edit=vi %s� compos�=vi %s; needsterminal; priovity=3
(yes, that's the encoding crap that I was talking about)

gtk-update-icon-cache failed before and when run with the manpage demo parameters, the output is exactly as useless as the error message before.

Code: Select all

sudo gtk-update-icon-cache /usr/share/icons/hicolor -f
gtk-update-icon-cache: The generated cache was invalid.
Effects on the main problem?
apt-update still craps itself

Code: Select all

W: GPG error: http://raspbian.raspberrypi.org/raspbian stretch InRelease: Unknown error executing apt-key
W: The repository 'http://raspbian.raspberrypi.org/raspbian stretch InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
because

Code: Select all

sudo gpgv -v --keyring /etc/apt/trusted.gpg Release.gpg Release
gpgv: armor header: Version: GnuPG v2
gpgv: Signature made Sun 23 Dec 2018 17:22:45 CET
gpgv:                using RSA key 9165938D90FDDD2E

gpgv: signal Segmentation fault caught ... exiting
Segmentation fault
Also the desktop is now black and all icons are gone (red cross).

I'd like to find and fix the culprit, but this may be BER (just like the airport).

Return to “Troubleshooting”