LoginSignup
0
0

More than 3 years have passed since last update.

[解決済み] gpg: can't connect to the agent: IPC connect呼び出しに失敗しました

Posted at

WSL1のUbuntuでパッケージ更新しようとしたところ、エラーとなったので対策経過のメモ。

"sudo apt update"実行時に以下の内容のメッセージ

$ sudo apt update
()
エラー:1 http://dl.google.com/linux/chrome/deb stable InRelease
  公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 78BD65473CB3BD13
()
パッケージリストを読み込んでいます... 完了
W: GPG エラー: http://dl.google.com/linux/chrome/deb stable InRelease: 公開鍵を利用できないため、以下の署名は検証できませんでした: NO_PUBKEY 78BD65473CB3BD13
E: リポジトリ http://dl.google.com/linux/chrome/deb stable InRelease は署名されていません。
N: このようなリポジトリから更新を安全に行うことができないので、デフォルトでは更新が無効になっています。
N: リポジトリの作成とユーザ設定の詳細は、apt-secure(8) man ページを参照してください。
$

公開鍵が使えていないとのことなので"Google Linux Software Repositories"を参考に公開鍵を追加。

$ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
gpg: can't connect to the agent: IPC connect呼び出しに失敗しました
gpg: can't connect to the agent: IPC connect呼び出しに失敗しました
$

失敗していることはわかるので、とりあえず、「IPC connect呼び出しに失敗しました」をキーワードにGoogleで検索すると"gpg: can't connect to the agent: IPC connect call failed"という記事を発見。
記事内容に従って作業してみる。

$ sudo apt-key remove gpg
()
$ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
OK
$ 

(※ログがきちんと残っていなかったので、ここでは省略していますが、"apt-key remove gpg"を実行するとパッケージがいくつか削除される動作のようなので、モジュールが古くなってたのかな?とか考えていますが、詳細については勉強不足)

この時点で"apt-key list"で確認すると、きちんと"Google Linux Package Signing Key"が入っている。

$ apt-key list
/etc/apt/trusted.gpg
--------------------
pub   ()
 フィンガー・プリント = ()
uid                  Google, Inc. Linux Package Signing Key <linux-packages-keymaster@google.com>
sub   ()

pub   ()
 フィンガー・プリント = ()
uid                  Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>
sub   ()

(以下略)
$

再度、"sudo apt update"を実行。

$ sudo apt update
取得:1 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
ヒット:2 http://security.ubuntu.com/ubuntu focal-security InRelease
ヒット:3 http://archive.ubuntu.com/ubuntu focal InRelease
取得:4 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,117 B]
ヒット:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
ヒット:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease
1,117 B を 3秒 で取得しました (410 B/s)
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
アップグレードできるパッケージが 19 個あります。表示するには 'apt list --upgradable' を実行してください。
$ 

エラーはなく正常にパッケージリストが更新されたようなので、引き続き、"sudo apt upgrade"を実行。

$ sudo apt upgrade
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
アップグレードパッケージを検出しています... 完了
(以下略)
$

エラーはなく正常に更新できたようなので、(とりあえず)完了。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0