2

I have been able to update my system and suddenly I am getting an error

Unknown error executing apt-key

and I have no idea what caused it. Also when I attempt any query of the key I get an error

/usr/bin/apt-key: 710: touch: Too many levels of symbolic links

which I have never gotten on any of the systems on this network and all run the same image.

AdminBee
  • 21,637
  • 21
  • 47
  • 71
bdaniel
  • 21
  • 1
  • 2
  • 1
    can you add some info about which distro/release you are running - similar question here - https://superuser.com/questions/1684891/debian-10-apt-update-suddenly-stopped-working-without-config-change-unknown-err – Bravo Nov 15 '21 at 22:01
  • 1
    Please edit your question and append the results of `sudo ldd /usr/bin/gpg` to it. It should be about 14 lines of output. – karel Nov 16 '21 at 02:05

1 Answers1

2
  1. Reinstall gpg.

    sudo apt reinstall gpg
    
  2. Find the location of gpg.

    which gpg
    > /usr/bin/gpg
    
  3. Point at the path from the results of which gpg and run ldconfig on it.

    sudo ldconfig /usr/bin/gpg
    
karel
  • 1,961
  • 2
  • 17
  • 26
  • 1
    Thank you! FIIIIINALLY `sudo apt update` works again for me! I had to use `sudo` or else I got "Permission denied". My final command I ran was `sudo ldconfig /usr/local/bin/gpg` since `which gpg` for me shows `/usr/local/bin/gpg`. – Gabriel Staples Nov 04 '22 at 03:03
  • Turns out I had to use this in my answer here too: [How to install/upgrade to the latest version of Poppler/`pdftoppm` (version 22.11.0 at the time of this writing) on Linux Ubuntu](https://stackoverflow.com/a/74313286/4561887). I've never used `ldconfig` before. Glad I found this answer. – Gabriel Staples Nov 04 '22 at 08:20