【问题标题】:I tried installing python 3.6 in ubuntu but every time I give the command in the terminal it shows an error:我尝试在 ubuntu 中安装 python 3.6 但每次我在终端中发出命令时都会显示错误:
【发布时间】:2018-05-29 05:47:31
【问题描述】:

我尝试在 ubuntu 中安装 python 3.6

sudo apt-get install python3.6

它给出了以下错误

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?

【问题讨论】:

标签: python ubuntu terminal python-3.6


【解决方案1】:

发生这种情况的锁是在 apt 进程运行时放置的,并在进程完成时移除。如果有一个没有进程运行的锁,这可能意味着该进程由于某种原因被卡住并且没有释放锁。

试试这个:

ps aux | grep apt
sudo kill -9 processnumber

您可以在此处找到有关如何解除锁定的更多解决方案:https://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process

然后使用此链接安装python3.6:https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get

【讨论】:

  • 再次给出错误E:无法找到包python3.6 E:通过glob'python3.6'找不到任何包E:通过正则表达式'python3.6找不到任何包'
  • 按照我的答案中的第二个链接并尝试安装。这是因为 python3.6 在您的操作系统版本的通用存储库中不可用。您需要添加第三方存储库并从中下载。链接:askubuntu.com/questions/865554/…
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-10-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-12-07
  • 1970-01-01
  • 2017-08-10
相关资源
最近更新 更多