我正在尝试部署Django应用。当我打印时,
apt-get update
我看到
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list - RealFileExists (13: Permission denied)
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
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?
当我打印时, sudo apt-get update
我看到
-bash: sudo: command not found
我尝试使用su
而不是sudo
。但这很奇怪。例如,我打印su apt-get update
而什么也没发生,我只是看到一个新行,
(uiserver):u78600811:~$ su apt-get update
(uiserver):u78600811:~$
如果尝试安装某些软件包,则相同。我该怎么办?
如果有用的信息-我正在使用Debian
(uiserver):u87600811:~$ uname -a
Linux infong1559 3.14.0-ui16294-uiabi1-infong-amd64 #1 SMP Debian 3.14.79-2~ui80+4 (2016-10-20) x86_64 GNU/Linux
apt-cache policy sudo
怎样?并非所有Linux发行版默认都安装sudo(例如,仅当您在安装时未指定root密码时,Debian才会安装sudo)。您可以在没有root特权的情况下运行apt-cache。