My YubiKeys stopped working with GnuPG (PGP) after a release upgrade from Ubuntu 22.04 (focal) to Ubuntu 24.04 (noble) on my device(s):
gpg --card-status
gpg: selecting card failed: No such device
gpg: OpenPGP card not available: No such device
GnuPG device error on Ubuntu 24.04 with attached YubiKey
GnuPG did not detect the attached YubiKey after the release upgrade. Similar issues have been reported on https://bugs.launchpad.net/ubuntu.
YubiKeys & GnuPG on Ubuntu 24.04
Required apt packages
sudo apt install gnupg2 libpcsclite1 pcscd scdaemon
sudo systemctl enable --now pcscd
GnuPG scdaemon configuration
cat .gnupg/scdaemon.conf
disable-ccid
pcsc-shared
Restart gpg-agent
pkill -9 gpg-agent
Verify GnuPG works with YubiKey
gpg --card-status
Reader ………..: Yubico YubiKey FIDO CCID 01 00
...
Optional: Install YubiKey Manager for Ubuntu 24.04 by downloading the AppImage Applications from: https://www.yubico.com/support/download/yubikey-manager
P.S.: Follow this steps to disable smartcard-authentication if your Ubuntu Login defaults to your YubiKey instead of your password: https://askubuntu.com/questions/1339157/disable-smartcard-integration-in-hirsute