GnuPG 2とgpg-connect-agentが「ERR 67108983 No SmartCard daemon」で失敗するのはなぜですか?

GnuPG 2とgpg-connect-agentが「ERR 67108983 No SmartCard daemon」で失敗するのはなぜですか?

gpg2Debian JessieとGnuPG 2を使用してGnuPG 2()またはgpg-connect-agentOpenPGPスマートカード(私の場合はYubiKey)を使用しようとするたびに、メッセージで操作が失敗します。

$ gpg-connect-agent --hex "scd apdu 00 f1 00 00" /bye
ERR 67108983 No SmartCard daemon <GPG Agent>
$ gpg2 --card-status
ERR 67108983 No SmartCard daemon <GPG Agent>

以前のバージョンのGnuPG 1()を使用すると、gpgすべてがうまく機能します。

ここで何の問題がありますか?

ベストアンサー1

scdaemon書いた

gpg-agentGnuPG 2は、スマートカード機能を含まず、他のアプリケーションを介してアクセスするカードに接続して機能します。これは設定可能で、次にシステム固有のデフォルト値を持ちますman gpg-agent

--scdaemon-program filename
      Use program filename as the Smartcard daemon.  The default is
      installation dependent and can be shown with the gpgconf command.

これにより、GnuPGは以下を実行しようとします/usr/lib/gnupg2/scdaemon

$ gpgconf
gpg:GPG für OpenPGP:/usr/bin/gpg2
gpg-agent:GPG Agent:/usr/bin/gpg-agent
scdaemon:Smartcard Daemon:/usr/lib/gnupg2/scdaemon
[snip]

ただし、以下は使用できません。

$ /usr/lib/gnupg2/scdaemon
bash: /usr/lib/gnupg2/scdaemon2: No such file or directory

インストールscdaemon

クイッククエリをapt-cache見ると、Debian がscdaemon このgnupg2パッケージをパッケージから削除したことがわかります。それはおそらく、GnuPGがそうでない場合には持てない多くの新しい依存関係を導入したからです。

Package: scdaemon
Source: gnupg2
Version: 2.1.10-3
Installed-Size: 538
Maintainer: Debian GnuPG Maintainers <[email protected]>
Architecture: amd64
Replaces: gpgsm (<< 2.0.18-2)
Depends: gnupg-agent (= 2.1.10-3), libassuan0 (>= 2.2.0), libc6 (>= 2.15),
  libgcrypt20 (>= 1.6.1), libgpg-error0 (>= 1.14), libksba8 (>= 1.2.0),
  libnpth0 (>= 0.90), libusb-0.1-4 (>= 2:0.1.12)
Breaks: gpgsm (<< 2.0.18-2)
Description-en: GNU privacy guard - smart card support
 GnuPG is GNU's tool for secure communication and data storage.
 It can be used to encrypt data and to create digital signatures.
 It includes an advanced key management facility and is compliant
 with the proposed OpenPGP Internet standard as described in RFC4880.
 .
 This package contains the smart card program scdaemon, which is used
 by gnupg-agent to access OpenPGP smart cards.

インストールするとsudo apt-get install scdaemon問題が解決します。

おすすめ記事