LoginSignup
0
1

More than 5 years have passed since last update.

sudo apt updateできない

Posted at

きっかけ

過去の投稿にコメントでアドバイス頂き、アドバイスを試そうと約半年ぶりにubuntuを起動。
まずOSを更新でもするかとコマンドを打つと次のようなエラー発生。

環境

ubuntu 16.04

エラー内容

$sudo apt update

W: ターゲット DEP-11-icons (main/dep11/icons-64x64.tar) は /etc/apt/sources.list.d/google-chrome.list:3 と /etc/apt/sources.list.d/google.list:2 で複数回設定されています

対策

色々調べ、次の記事を参考に対策。
https://qiita.com/on-vegetable/items/8f821be0641d0dbb7631

cd /etc/apt/sources.list.d/
sudo gedit google.list

google.listの中身は、次のような感じ。
同じ内容が2行存在。

deb http://dl.google.com/linux/chrome/deb/ stable main
deb http://dl.google.com/linux/chrome/deb/ stable main

失敗

これがエラーの原因かと思い、次のように修正。

#deb http://dl.google.com/linux/chrome/deb/ stable main
deb http://dl.google.com/linux/chrome/deb/ stable main

しかし、改めてupdateを実行しても、エラーは解消されない。

成功

失敗を受けて、次のように修正。

#deb http://dl.google.com/linux/chrome/deb/ stable main
#deb http://dl.google.com/linux/chrome/deb/ stable main

これでエラーが解消し、update無事完了。
その後、upgradeも無事完了。

最後に

今回使ったコマンド。

$sudo apt update
$sudo apt upgrade
0
1
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
1