Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APT Key Expired and Unable to Update / Install #89

Open
k4yt3x opened this issue Jul 21, 2018 · 4 comments
Open

APT Key Expired and Unable to Update / Install #89

k4yt3x opened this issue Jul 21, 2018 · 4 comments

Comments

@k4yt3x
Copy link

k4yt3x commented Jul 21, 2018

Background Info

  • windows version 1803
  • kali was previously installed
  • WSL was fully uninstalled after the first segmentation fault

Possible Cause

  • Kali docker image (if I'm getting this right) is outdated
  • APT cache and Kali GPG keys are outdated

Potential Fix

  • Update Kali docker image with
    • Newer Kali GPG keys imported
    • APT cache updated

Please tell me if I got anything wrong or if this issue doesn't belong here.

When attempting to update, APT throws the following error:

root@AVLWS:/mnt/c/Users/K4YT3X# apt update
Get:1 http://kali.mirror.globo.tech/kali kali-rolling InRelease [30.5 kB]
Err:1 http://kali.mirror.globo.tech/kali kali-rolling InRelease
  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument
W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://kali.mirror.globo.tech/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@AVLWS:/mnt/c/Users/K4YT3X#

If we try to install new key

root@AVLWS:/mnt/c/Users/K4YT3X# apt-key adv --keyserver hkp://keys.gnupg.net --recv ED444FF07D8D0BF6
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
root@AVLWS:/mnt/c/Users/K4YT3X#

If we try to install gnupg2 using APT

root@AVLWS:/mnt/c/Users/K4YT3X# apt install gnupg2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libassuan0
  libksba8 libldap-2.4-2 libldap-common libnpth0 libsasl2-2 libsasl2-modules libsasl2-modules-db libsqlite3-0
  pinentry-curses
Suggested packages:
  dbus-user-session libpam-systemd pinentry-gnome3 tor parcimonie xloadimage scdaemon libsasl2-modules-gssapi-mit
  | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql pinentry-doc
The following NEW packages will be installed:
  dirmngr gnupg gnupg-l10n gnupg-utils gnupg2 gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libassuan0
  libksba8 libldap-2.4-2 libldap-common libnpth0 libsasl2-2 libsasl2-modules libsasl2-modules-db libsqlite3-0
  pinentry-curses
0 upgraded, 21 newly installed, 0 to remove and 0 not upgraded.
Need to get 7260 kB/7962 kB of archives.
After this operation, 16.0 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Err:1 http://http.kali.org/kali kali-rolling/main amd64 libsqlite3-0 amd64 3.21.0-1
  404  Not Found [IP: 192.99.200.113 80]
Err:2 http://http.kali.org/kali kali-rolling/main amd64 libassuan0 amd64 2.5.1-1
  404  Not Found [IP: 192.99.200.113 80]
Err:3 http://http.kali.org/kali kali-rolling/main amd64 gpgconf amd64 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:4 http://http.kali.org/kali kali-rolling/main amd64 dirmngr amd64 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:5 http://http.kali.org/kali kali-rolling/main amd64 gnupg-l10n all 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:6 http://http.kali.org/kali kali-rolling/main amd64 gnupg-utils amd64 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:7 http://http.kali.org/kali kali-rolling/main amd64 gpg amd64 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:8 http://http.kali.org/kali kali-rolling/main amd64 pinentry-curses amd64 1.0.0-3
  404  Not Found [IP: 192.99.200.113 80]
Err:9 http://http.kali.org/kali kali-rolling/main amd64 gpg-agent amd64 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:10 http://http.kali.org/kali kali-rolling/main amd64 gpg-wks-client amd64 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:11 http://http.kali.org/kali kali-rolling/main amd64 gpg-wks-server amd64 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:12 http://http.kali.org/kali kali-rolling/main amd64 gpgsm amd64 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:13 http://http.kali.org/kali kali-rolling/main amd64 gnupg amd64 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:14 http://http.kali.org/kali kali-rolling/main amd64 gnupg2 all 2.2.4-1
  404  Not Found [IP: 192.99.200.113 80]
W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument
E: Failed to fetch http://http.kali.org/kali/pool/main/s/sqlite3/libsqlite3-0_3.21.0-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/liba/libassuan/libassuan0_2.5.1-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpgconf_2.2.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/dirmngr_2.2.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gnupg-l10n_2.2.4-1_all.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gnupg-utils_2.2.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpg_2.2.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/p/pinentry/pinentry-curses_1.0.0-3_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpg-agent_2.2.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpg-wks-client_2.2.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpg-wks-server_2.2.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gpgsm_2.2.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gnupg_2.2.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/g/gnupg2/gnupg2_2.2.4-1_all.deb  404  Not Found [IP: 192.99.200.113 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@AVLWS:/mnt/c/Users/K4YT3X#

On the first try, if we do dpkg -i all the gnupg2 packages, a segmentation fault occurs and the subsystem has to be reinstalled.

root@AVLWS:/mnt/c/Users/K4YT3X/Desktop/gnupg2# dpkg -i *.deb
Selecting previously unselected package dirmngr.
(Reading database ... 9041 files and directories currently installed.)
Preparing to unpack dirmngr_2.2.8-3_amd64.deb ...
Unpacking dirmngr (2.2.8-3) ...
Selecting previously unselected package gnupg-l10n.
Preparing to unpack gnupg-l10n_2.2.8-3_all.deb ...
Unpacking gnupg-l10n (2.2.8-3) ...
Selecting previously unselected package gnupg-utils.
Preparing to unpack gnupg-utils_2.2.8-3_amd64.deb ...
Unpacking gnupg-utils (2.2.8-3) ...
Selecting previously unselected package gnupg2.
Preparing to unpack gnupg2_2.2.8-3_all.deb ...
Unpacking gnupg2 (2.2.8-3) ...
Selecting previously unselected package gnupg.
Preparing to unpack gnupg_2.2.8-3_all.deb ...
Unpacking gnupg (2.2.8-3) ...
Selecting previously unselected package gpg-agent.
Preparing to unpack gpg-agent_2.2.8-3_amd64.deb ...
Unpacking gpg-agent (2.2.8-3) ...
Selecting previously unselected package gpg-wks-client.
Preparing to unpack gpg-wks-client_2.2.8-3_amd64.deb ...
Unpacking gpg-wks-client (2.2.8-3) ...
Selecting previously unselected package gpg-wks-server.
Preparing to unpack gpg-wks-server_2.2.8-3_amd64.deb ...
Unpacking gpg-wks-server (2.2.8-3) ...
Selecting previously unselected package gpg.
Preparing to unpack gpg_2.2.8-3_amd64.deb ...
Unpacking gpg (2.2.8-3) ...
Selecting previously unselected package gpgconf.
Preparing to unpack gpgconf_2.2.8-3_amd64.deb ...
Unpacking gpgconf (2.2.8-3) ...
Selecting previously unselected package gpgsm.
Preparing to unpack gpgsm_2.2.8-3_amd64.deb ...
Unpacking gpgsm (2.2.8-3) ...
Selecting previously unselected package libassuan0:amd64.
Preparing to unpack libassuan0_2.5.1-2_amd64.deb ...
Unpacking libassuan0:amd64 (2.5.1-2) ...
Selecting previously unselected package libksba8:amd64.
Preparing to unpack libksba8_1.3.5-2_amd64.deb ...
Unpacking libksba8:amd64 (1.3.5-2) ...
Selecting previously unselected package libldap-2.4-2:amd64.
Preparing to unpack libldap-2.4-2_2.4.46+dfsg-5_amd64.deb ...
Unpacking libldap-2.4-2:amd64 (2.4.46+dfsg-5) ...
Selecting previously unselected package libldap-common.
Preparing to unpack libldap-common_2.4.46+dfsg-5_all.deb ...
Unpacking libldap-common (2.4.46+dfsg-5) ...
Selecting previously unselected package libnpth0:amd64.
Preparing to unpack libnpth0_1.5-4_amd64.deb ...
Unpacking libnpth0:amd64 (1.5-4) ...
Selecting previously unselected package libsasl2-2:amd64.
Preparing to unpack libsasl2-2_2.1.27~101-g0780600+dfsg-3.1_amd64.deb ...
Unpacking libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3.1) ...
Selecting previously unselected package libsasl2-modules-db:amd64.
Preparing to unpack libsasl2-modules-db_2.1.27~101-g0780600+dfsg-3.1_amd64.deb ...
Unpacking libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3.1) ...
Selecting previously unselected package libsasl2-modules:amd64.
Preparing to unpack libsasl2-modules_2.1.27~101-g0780600+dfsg-3.1_amd64.deb ...
Unpacking libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3.1) ...
Selecting previously unselected package libsqlite3-0:amd64.
Preparing to unpack libsqlite3-0_3.24.0-1_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.24.0-1) ...
Selecting previously unselected package pinentry-curses.
Preparing to unpack pinentry-curses_1.1.0-1+b1_amd64.deb ...
Unpacking pinentry-curses (1.1.0-1+b1) ...
Setting up gnupg-l10n (2.2.8-3) ...
dpkg: dependency problems prevent configuration of gnupg:
 gnupg depends on gpgv (>= 2.2.8-3); however:
  Version of gpgv on system is 2.2.4-1.

dpkg: error processing package gnupg (--install):
 dependency problems - leaving unconfigured
Setting up libassuan0:amd64 (2.5.1-2) ...
Setting up libksba8:amd64 (1.3.5-2) ...
Setting up libldap-common (2.4.46+dfsg-5) ...
Setting up libnpth0:amd64 (1.5-4) ...
Setting up libsasl2-modules-db:amd64 (2.1.27~101-g0780600+dfsg-3.1) ...
Setting up libsasl2-modules:amd64 (2.1.27~101-g0780600+dfsg-3.1) ...
Setting up libsqlite3-0:amd64 (3.24.0-1) ...
dpkg: dependency problems prevent configuration of pinentry-curses:
 pinentry-curses depends on libncursesw6 (>= 6); however:
  Package libncursesw6 is not installed.
 pinentry-curses depends on libtinfo6 (>= 6); however:
  Package libtinfo6 is not installed.

dpkg: error processing package pinentry-curses (--install):
 dependency problems - leaving unconfigured
Setting up gnupg-utils (2.2.8-3) ...
dpkg: dependency problems prevent configuration of gnupg2:
 gnupg2 depends on gnupg (>= 2.2.8-3); however:
  Package gnupg is not configured yet.

dpkg: error processing package gnupg2 (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gpg-agent:
 gpg-agent depends on pinentry-curses | pinentry; however:
  Package pinentry-curses is not configured yet.
  Package pinentry is not installed.
  Package pinentry-curses which provides pinentry is not configured yet.

dpkg: error processing package gpg-agent (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gpg-wks-client:
 gpg-wks-client depends on gpg-agent (= 2.2.8-3); however:
  Package gpg-agent is not configured yet.

dpkg: error processing package gpg-wks-client (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gpg-wks-server:
 gpg-wks-server depends on gpg-agent (= 2.2.8-3); however:
  Package gpg-agent is not configured yet.

dpkg: error processing package gpg-wks-server (--install):
 dependency problems - leaving unconfigured
Setting up gpgconf (2.2.8-3) ...
Setting up gpgsm (2.2.8-3) ...
Setting up libsasl2-2:amd64 (2.1.27~101-g0780600+dfsg-3.1) ...
Setting up gpg (2.2.8-3) ...
Setting up libldap-2.4-2:amd64 (2.4.46+dfsg-5) ...
Setting up dirmngr (2.2.8-3) ...
Processing triggers for libc-bin (2.25-5) ...
Errors were encountered while processing:
 gnupg
 pinentry-curses
 gnupg2
 gpg-agent
 gpg-wks-client
 gpg-wks-server

On the second try, a dynamic link issue occured.

root@AVLWS:/mnt/c/Users/K4YT3X/Desktop/gnupg2# ls
ls: relocation error: /lib/x86_64-linux-gnu/libc.so.6: symbol __tunable_get_val, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference
@electronslayer
Copy link

I have the exact same problem!

@ipfyx
Copy link

ipfyx commented Apr 21, 2021

Found a solution here :
https://askubuntu.com/questions/74345/how-do-i-bypass-ignore-the-gpg-signature-checks-of-apt

rm /var/lib/apt/lists/http.kali.org_kali_dists_kali-rolling_*

The following command is very dangerous, please know what you are doing.

sudo apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update
sudo apt-get install gnupg2
apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6

@k4yt3x
Copy link
Author

k4yt3x commented Apr 21, 2021

I'm surprised someone's still having this problem three years later.

@ipfyx
Copy link

ipfyx commented Apr 22, 2021

I found this post while googling, so I tought I might help.
I don't even use WSL-Distribution-Switcher but my issue was very similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants