运行以下命令会引发权限被拒绝错误Ubuntu 服务器 14.04.1 LTS
sudo apt-get update && apt-get dist-upgrade
错误是
Get:16 http://az1.clouds.archive.ubuntu.com trusty-updates/main Sources [149 kB]
Get:17 http://az1.clouds.archive.ubuntu.com trusty-updates/universe Sources [95.6 kB]
Get:18 http://az1.clouds.archive.ubuntu.com trusty-updates/main amd64 Packages [387 kB]
Get:19 http://az1.clouds.archive.ubuntu.com trusty-updates/universe amd64 Packages [229 kB]
Get:20 http://az1.clouds.archive.ubuntu.com trusty-updates/main Translation-en [181 kB]
Get:21 http://az1.clouds.archive.ubuntu.com trusty-updates/universe Translation-en [117 kB]
Ign http://az1.clouds.archive.ubuntu.com trusty/main Translation-en_US
Ign http://az1.clouds.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 9,268 kB in 25s (370 kB/s)
Reading package lists... Done
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?
我正在执行juno安装中提到的步骤开放堆栈指导
答案1
您需要使用 来运行这两个命令sudo
。您正在运行sudo apt-get update
,但随后运行apt-get dist-upgrade
时没有sudo
.试试这个:
sudo apt-get update && sudo apt-get dist-upgrade