我必须在 ubuntu 中安装 Review board,我尝试了以下命令,但出现错误
sudo apt-get install python-setuptools.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-setuptools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package python-setuptools has no installation candidate
Run Code Online (Sandbox Code Playgroud)
然后我尝试了下面的命令,但为此我也收到了错误消息:
apt-get upgrade
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)
我该怎么办?请帮帮我!!!!
M.T*_*run 16
按Ctrl+ Alt+打开终端T并键入以下内容:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-setuptools
错误Error1背后的原因
:
Package python-setuptools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package python-setuptools has no installation candidate
Run Code Online (Sandbox Code Playgroud)
当您尝试安装 APT 不知道的软件包时,就会发生这种情况。当您添加软件源然后执行 apt-get update 时,系统 APT 的数据库将使用软件源列表中列出的存储库中的所有软件包进行更新。
然后,当您尝试安装任何软件包时,apt 会检查其数据库中的软件包名称,找到它并检查它从何处获取的存储库名称。然后它从该 repo 下载包。
错误2:
apt-get upgrade
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)
这意味着你不是root用户,所以我们用rootsudo来执行
请不要使用easy_install,而是尝试pip一下。
sudo apt-get install python-pip
Run Code Online (Sandbox Code Playgroud)
现在您可以以与 几乎相同的方式使用它easy_install,但具有更好的包管理。
sudo pip install <pypi-package>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
64235 次 |
| 最近记录: |