我正在尝试部署 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: …
Run Code Online (Sandbox Code Playgroud) 我这样写:
sudo apt-get update && apt-get install curl
Run Code Online (Sandbox Code Playgroud)
并得到这个输出:
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Run Code Online (Sandbox Code Playgroud)
然后我写这个:
须藤rm /var/lib/apt/lists/lock
须藤rm /var/cache/apt/archives/lock
然后我重复安装 cURL 并得到这个:
E: Some index files failed to download. They have been ignored, or old ones used instead. …
Run Code Online (Sandbox Code Playgroud)