python - 我尝试在 ubuntu 中安装 python 3.6 但每次我在终端中发出命令时都会显示错误:
问题描述
我尝试在 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?
解决方案
发生这种情况的锁在 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
推荐阅读
- git - 为什么 git commit 让我及时回到 master 分支?
- sql - 根据每个案例中的其他列生成一列
- excel - 需要 Excel IF 函数帮助
- python - keras:用无维度重塑张量
- c# - NHibernate:在/从 Sqlite 中存储/检索日期
- android - 关于 IOS App Store 和 Google Store 促销代码
- app-engine-flexible - Google App Engine Flexible 每周更新 - 它是如何工作的?
- python - Python生成矩阵的所有可能组合
- c++ - 具有一致索引的快速查找的数据结构
- php - 错误:完整性约束违规:在 Laravel Eloquent 中加入时出现 1052