apt-get 更新エラー 取得に失敗しました

apt-get 更新エラー 取得に失敗しました

リポジトリを更新しようとしていますが、次のエラーが表示されます:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release  Unable to find expected entry 'partner/source/Sources' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.

/etc/apt/sources.list次のようになります:

> #############################################################
> ################### OFFICIAL UBUNTU REPOS ###################
> #############################################################
> 
> ###### Ubuntu Main Repos deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse deb-src
> http://us.archive.ubuntu.com/ubuntu/ precise main restricted universe
> multiverse
> 
> ###### Ubuntu Update Repos deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse deb
> http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted
> universe multiverse deb http://us.archive.ubuntu.com/ubuntu/
> precise-backports main restricted universe multiverse deb-src
> http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted
> universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/
> precise-updates main restricted universe multiverse deb-src
> http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted
> universe multiverse
> 
> ###### Ubuntu Partner Repo
> # deb http://archive.canonical.com/ubuntu precise partner
> # deb-src http://archive.canonical.com/ubuntu precise partner
> 
> ###### Ubuntu Extras Repo
> # deb http://extras.ubuntu.com/ubuntu precise main
> # deb-src http://extras.ubuntu.com/ubuntu precise main
> # deb http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse
> # deb http://archive.ubuntu.com/ubuntu trusty-updates main universe multiverse restricted

答え1

削除して再度生成してみることもできますsources.list。ただし、まずはファイルをバックアップしてください。

ターミナルを開くCTRLALTT

次のコードで削除しますsources.list:

sudo rm /etc/apt/sources.list

これを開いた後software-properties-gtk

software-properties-gtk

これが開きsoftware-properties-gtk、新しいものsources.listが自動的に作成されます。

別のチェックボックスをオンにすると、sources.list ファイルの再生成に役立ちます。閉じると、キャッシュを削除するように求められます。sources.listこれでファイルを確認できます。

編集: また、それを使うこともできますWebサイトファイルを再生成しますsources.list

関連情報