Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gpg: selecting card failed: No such device

I have ubuntu 20.04 machine and installed gpg and related tools using below commad

sudo apt install gpg gnupg gnupg-pkcs11-scd

But when i run gpg --card-status, I get below error

gpg: selecting card failed: No such device
gpg: OpenPGP card not available: No such device

Should I install anything else for this ?

like image 364
Karma Yogi Avatar asked Feb 22 '26 05:02

Karma Yogi


2 Answers

It seems like pcscd.service is inactive by default, have you tried (re)starting it?

sudo service pcscd restart
like image 68
sroecker Avatar answered Feb 27 '26 02:02

sroecker


Try forcing a restart of the gpg-agent with pkill gpg-agent

➜ gpg --card-status
gpg: selecting card failed: Service is not running
gpg: OpenPGP card not available: Service is not running

➜ pkill gpg-agent

➜ gpg --card-status
Reader ...........: Yubico YubiKey OTP FIDO CCID
...
like image 38
mabahamo Avatar answered Feb 27 '26 02:02

mabahamo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!