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
513

您可以尝试删除sources.list并重新生成。但是请先备份文件。

打开终端 CTRLALTT

sources.list使用以下代码删除

sudo rm /etc/apt/sources.list

打开之后software-properties-gtk

software-properties-gtk

这将打开software-properties-gtksources.list自动创建一个新的

并选中另一个复选框,它有助于重新生成sources.list文件。并关闭,它要求您提供删除缓存。sources.list现在可以检查文件。

编辑:此外,您可以使用该网站重新生成sources.list文件。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章