首 页文章中心

Linux学习网

您的位置Linux学习网 > Linux基本应用 > 文章内容

解决ubuntu无法使用“apt-get update” 命令的方法

作者:佚名  来源:不详  发布时间:2008-8-1 15:29:00
今天在Ubuntu上更新了一下更新源。

  更新完更新源之后,想对更新一下,在终端中输入 sudo apt-get update 但是这个命令似乎不起作用了,没法更新---

  终端显示显示为
  E: 无法获得锁 /var/lib/apt/lists/lock - open (11 Resource temporarily unavailable)
  E: 无法对状态列表目录加锁

  于是上网寻求解决方案,一搜很快找到了解决方案:删除/var/lib/apt/lists/lock 文件,具体命令是 sudo rm /var/lib/apt/lists/lock

  删除lock 文件后再在终端中输入 sudo apt-get update 回车,更新正常开始。(运行管理员命令需使用 sudo Ubuntu默认掩藏root用户)

  今天更新Ubuntu花了我差不多50分钟的时间,实在是慢啊。我用的是以下的更新源,不知有没有更快的更新源?
class=codetop>CODE: class=codemain>deb http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse

deb-src http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse

收藏本页到: 365Key | del.icio.us | | 添加到雅虎收藏+
  • 网站帮助 - 广告合作 - 网站地图