Tech
💡

Linux Mint(Ubuntu)で Google Chrome の apt リポジトリ警告が出る件

最近、Linux Mint で apt update を実行したときに、以下の警告が表示されるようになりました。

N: リポジトリ 'https://dl.google.com/linux/chrome-stable/deb stable InRelease' がアーキテクチャ 'i386' をサポートしないため設定ファイル 'main/binary-i386/Packages' の取得をスキップ

そのまま使っていても特に問題はないのですが、通知が気になるので対応することにしました。

対応前

以前から /etc/apt/sources.list.d/google-chrome.list には [arch=amd64] を指定していました。

cat /etc/apt/sources.list.d/google-chrome.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main

これでしばらく運用していたのですが、最近また警告が出るようになりました。

原因と対応

どうやら最近 Google Chrome のリポジトリが .sources 形式(deb822形式)に変わった影響のようです。

/etc/apt/sources.list.d/google-chrome.sources にもアーキテクチャの指定が必要になっていました。

以下の1行をファイルの末尾に追加したら、警告が消えました。

Architectures: amd64

修正後のファイル全体はこちらです:

sudo cat /etc/apt/sources.list.d/google-chrome.sources
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# Changes to this file will not be preserved.
# This file will not be recreated if removed.
X-Repolib-Name: Google Chrome
Types: deb
URIs: https://dl.google.com/linux/chrome-stable/deb/
Suites: stable
Components: main
Signed-By: /usr/share/keyrings/google-chrome.gpg
Architectures: amd64

まとめ

  • Google Chrome の公式リポジトリが .list.sources に移行した影響で、以前の [arch=amd64] だけでは不十分になった
  • .sources ファイルにも Architectures: amd64 を明示的に追加すればOK
  • 特に難しい問題ではないですが、同じ警告が出ている人の参考になれば