我得到以下输出:
7 packages can be updated.
7 updates are security updates.
Last login: Tue Apr 19 10:04:51 2016 from 10.0.0.199
每当我连接到服务器时。而且我仍然看到这些软件包没有更新!我是root(sudo su
)。
当sudo apt-get update
我得到这个:
myserver@YHserver:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denie d)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Hit http://il.archive.ubuntu.com wily InRelease
Hit http://il.archive.ubuntu.com wily-updates InRelease
Hit http://il.archive.ubuntu.com wily-backports InRelease
Hit http://il.archive.ubuntu.com wily/main Sources
Hit http://il.archive.ubuntu.com wily/restricted Sources
Hit http://il.archive.ubuntu.com wily/universe Sources
Hit http://il.archive.ubuntu.com wily/multiverse Sources
Hit http://il.archive.ubuntu.com wily/main amd64 Packages
Hit http://il.archive.ubuntu.com wily/restricted amd64 Packages
Hit http://il.archive.ubuntu.com wily/universe amd64 Packages
Hit http://il.archive.ubuntu.com wily/multiverse amd64 Packages
Hit http://il.archive.ubuntu.com wily/main i386 Packages
Hit http://il.archive.ubuntu.com wily/restricted i386 Packages
Hit http://il.archive.ubuntu.com wily/universe i386 Packages
Hit http://il.archive.ubuntu.com wily/multiverse i386 Packages
Hit http://il.archive.ubuntu.com wily/main Translation-en
Hit http://il.archive.ubuntu.com wily/multiverse Translation-en
Hit http://il.archive.ubuntu.com wily/restricted Translation-en
Hit http://il.archive.ubuntu.com wily/universe Translation-en
Hit http://il.archive.ubuntu.com wily-updates/main Sources
Hit http://il.archive.ubuntu.com wily-updates/restricted Sources
Hit http://il.archive.ubuntu.com wily-updates/universe Sources
Hit http://il.archive.ubuntu.com wily-updates/multiverse Sources
Hit http://il.archive.ubuntu.com wily-updates/main amd64 Packages
Hit http://il.archive.ubuntu.com wily-updates/restricted amd64 Packages
Hit http://il.archive.ubuntu.com wily-updates/universe amd64 Packages
Hit http://il.archive.ubuntu.com wily-updates/multiverse amd64 Packages
Hit http://il.archive.ubuntu.com wily-updates/main i386 Packages
Hit http://il.archive.ubuntu.com wily-updates/restricted i386 Packages
Hit http://il.archive.ubuntu.com wily-updates/universe i386 Packages
Hit http://il.archive.ubuntu.com wily-updates/multiverse i386 Packages
Hit http://il.archive.ubuntu.com wily-updates/main Translation-en
Hit http://il.archive.ubuntu.com wily-updates/multiverse Translation-en
Hit http://il.archive.ubuntu.com wily-updates/restricted Translation-en
Hit http://il.archive.ubuntu.com wily-updates/universe Translation-en
Hit http://il.archive.ubuntu.com wily-backports/main Sources
Hit http://il.archive.ubuntu.com wily-backports/restricted Sources
Hit http://il.archive.ubuntu.com wily-backports/universe Sources
Hit http://il.archive.ubuntu.com wily-backports/multiverse Sources
Hit http://il.archive.ubuntu.com wily-backports/main amd64 Packages
Hit http://il.archive.ubuntu.com wily-backports/restricted amd64 Packages
Hit http://il.archive.ubuntu.com wily-backports/universe amd64 Packages
Hit http://il.archive.ubuntu.com wily-backports/multiverse amd64 Packages
Hit http://il.archive.ubuntu.com wily-backports/main i386 Packages
Hit http://il.archive.ubuntu.com wily-backports/restricted i386 Packages
Hit http://il.archive.ubuntu.com wily-backports/universe i386 Packages
Get:1 http://security.ubuntu.com wily-security InRelease [65.9 kB]
Hit http://il.archive.ubuntu.com wily-backports/multiverse i386 Packages
Hit http://il.archive.ubuntu.com wily-backports/main Translation-en
Hit http://il.archive.ubuntu.com wily-backports/multiverse Translation-en
Hit http://il.archive.ubuntu.com wily-backports/restricted Translation-en
Hit http://il.archive.ubuntu.com wily-backports/universe Translation-en
Get:2 http://security.ubuntu.com wily-security/main Sources [45.5 kB]
Get:3 http://security.ubuntu.com wily-security/restricted Sources [2,854 B]
Get:4 http://security.ubuntu.com wily-security/universe Sources [11.7 kB]
Get:5 http://security.ubuntu.com wily-security/multiverse Sources [2,782 B]
Get:6 http://security.ubuntu.com wily-security/main amd64 Packages [145 kB]
Get:7 http://security.ubuntu.com wily-security/restricted amd64 Packages [10.9 k B]
Get:8 http://security.ubuntu.com wily-security/universe amd64 Packages [52.1 kB]
Get:9 http://security.ubuntu.com wily-security/multiverse amd64 Packages [6,253 B]
Get:10 http://security.ubuntu.com wily-security/main i386 Packages [142 kB]
Get:11 http://security.ubuntu.com wily-security/restricted i386 Packages [10.8 k B]
Get:12 http://security.ubuntu.com wily-security/universe i386 Packages [52.1 kB]
Get:13 http://security.ubuntu.com wily-security/multiverse i386 Packages [6,430 B]
Hit http://security.ubuntu.com wily-security/main Translation-en
Hit http://security.ubuntu.com wily-security/multiverse Translation-en
Hit http://security.ubuntu.com wily-security/restricted Translation-en
Hit http://security.ubuntu.com wily-security/universe Translation-en
Fetched 555 kB in 2s (227 kB/s)
Reading package lists... Done
我应该怎么做才能更新它?这是安全更新,似乎很重要
我总是apt-get upgrade -y
在“更新”之后运行。
我并没有删除锁定文件,而是按照此帖子的第二条评论:无法锁定管理目录(/ var / lib / dpkg /)是使用它的另一个过程吗?这没有帮助。我看不到持有“ apt”的过程
root 3004 0.0 0.0 9496 2260 pts/0 S+ 10:32 0:00 grep --color=auto apt-get
root@YHserver:/home/myserver# kill -9 3004
bash: kill: (3004) - No such process
root@YHserver:/home/myserver# kill -9 2260
bash: kill: (2260) - No such process
root@YHserver:/home/myserver# kill -9 9496
bash: kill: (9496) - No such process
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denie d)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
看来您有某种权限问题。
myserver@YHserver ...
在进行更新/升级时,您应该是root用户。看起来您是“ myserver”而不是root。您是通过ssh还是直接连接到计算机?(您需要启用“通过ssh root”)
请尝试执行patrick编写的命令并在此处报告结果
sudo apt-get update
sudo apt-get upgrade -y
如果这样做没有帮助,请尝试以下操作:
su
apt-get update
apt-get upgrade -y
我想到的另一种可能性是:您是否检查了远程升级?
sudo apt-get dist-upgrade
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句