运行以下命令会在Ubuntu Server 14.04.1 LTS 中引发 Permission denied 错误
sudo apt-get update && apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)
错误是
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?
Run Code Online (Sandbox Code Playgroud)
您需要使用sudo
. 您正在跑步,sudo apt-get update
但随后apt-get dist-upgrade
没有sudo
. 试试这个:
sudo apt-get update && sudo apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1898 次 |
最近记录: |