広告 Linux

apt-get で Duplicate sources だと怒られた時の対処法

Debianにaptを使ってOperaを入れた後、apt-get updateを実行すると以下の様なエラーが出るようになってしまいました。

# apt-get update

省略

W: Duplicate sources.list entry http://deb.opera.com/opera/ stable/non-free amd64 Packages (/var/lib/apt/lists/deb.opera.com_opera_dists_stable_non-free_binary-amd64_Packages)
W: これらの問題を解決するためには apt-get update を実行する必要があるかもしれません

パッケージのソースリストが複数あると上記のエラーが出るようなので、ダブりのソースリストを削除してやります。

# sudo rm /etc/apt/sources.list.d/opera.list

ソースリスト削除後に実行。

# apt-get update
ヒット http://security.debian.org jessie/updates InRelease
ヒット http://ftp.jp.debian.org jessie InRelease
ヒット http://ftp.jp.debian.org jessie-updates InRelease
ヒット http://security.debian.org jessie/updates/main Sources
ヒット http://ftp.jp.debian.org jessie/main Sources
ヒット http://security.debian.org jessie/updates/main amd64 Packages
ヒット http://ftp.jp.debian.org jessie/main amd64 Packages
ヒット http://security.debian.org jessie/updates/main Translation-en
ヒット http://ftp.jp.debian.org jessie/main Translation-ja
ヒット http://ftp.jp.debian.org jessie/main Translation-en
ヒット http://ftp.jp.debian.org jessie-updates/main Sources
取得:1 http://ftp.jp.debian.org jessie-updates/main amd64 Packages/DiffIndex [505 B]
取得:2 http://ftp.jp.debian.org jessie-updates/main Translation-en/DiffIndex [229 B]
ヒット http://deb.opera.com stable InRelease
ヒット http://deb.opera.com stable/non-free amd64 Packages
無視 http://deb.opera.com stable/non-free Translation-ja_JP
無視 http://deb.opera.com stable/non-free Translation-ja
無視 http://deb.opera.com stable/non-free Translation-en
734 B を 5秒 で取得しました (135 B/s)
パッケージリストを読み込んでいます... 完了
root@gealach:~# apt-get update
ヒット http://security.debian.org jessie/updates InRelease
ヒット http://security.debian.org jessie/updates/main Sources
ヒット http://ftp.jp.debian.org jessie InRelease
ヒット http://security.debian.org jessie/updates/main amd64 Packages
ヒット http://security.debian.org jessie/updates/main Translation-en
ヒット http://ftp.jp.debian.org jessie-updates InRelease
ヒット http://ftp.jp.debian.org jessie/main Sources
ヒット http://ftp.jp.debian.org jessie/main amd64 Packages
ヒット http://ftp.jp.debian.org jessie/main Translation-ja
ヒット http://ftp.jp.debian.org jessie/main Translation-en
ヒット http://deb.opera.com stable InRelease
ヒット http://ftp.jp.debian.org jessie-updates/main Sources
取得:1 http://ftp.jp.debian.org jessie-updates/main amd64 Packages/DiffIndex [505 B]
取得:2 http://ftp.jp.debian.org jessie-updates/main Translation-en/DiffIndex [229 B]
ヒット http://deb.opera.com stable/non-free amd64 Packages
無視 http://deb.opera.com stable/non-free Translation-ja_JP
無視 http://deb.opera.com stable/non-free Translation-ja
無視 http://deb.opera.com stable/non-free Translation-en
734 B を 4秒 で取得しました (147 B/s)
パッケージリストを読み込んでいます... 完了

問題なくアップデートできました!

Opera公式の案内通りにインストールしたのに、このようなエラーに出くわすという理不尽さよ。

Sponsor Link

-Linux
-