我无法在我的ubuntu中安装easy_install

我必须在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 

然后我尝试下面的命令,但为此我也收到错误消息:

 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? 

我该怎么办? 请帮帮我!!!!!

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 

当您尝试安装有关哪个APT没有任何想法的软件包时会发生这种情况。 当您添加软件源然后执行apt-get更新时,系统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? 

这意味着您不是root用户。因此我们使用sudo以root身份执行它

请不要使用easy_install ,而是尝试使用pip

 sudo apt-get install python-pip 

现在您可以像easy_install一样使用它,但具有更好的包管理。

 sudo pip install  

您在此处找到的第二个问题(无法打开锁定文件)的答案。