简体   繁体   English

我尝试在ubuntu中安装python 3.6,但是每次在终端中给出命令时,都会显示错误:

[英]I tried installing python 3.6 in ubuntu but every time I give the command in the terminal it shows an error:

I tried installing python 3.6 in ubuntu 我尝试在ubuntu中安装python 3.6

sudo apt-get install python3.6

It gives the following error 它给出了以下错误

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?

This happens lock is placed when an apt process is running, and is removed when the process completes. 当apt进程正在运行时,将发生这种锁定,在进程完成时将其删除。 If there is a lock with no process running, this may mean the process got stuck for some reason and has not released the lock. 如果存在没有运行任何进程的锁,则可能意味着该进程由于某种原因而卡住并且尚未释放该锁。

Try this: 尝试这个:

ps aux | grep apt
sudo kill -9 processnumber

You can find more solutions on how to remove the lock here: https://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process 您可以在此处找到有关如何删除锁的更多解决方案: https : //askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Ubuntu 16.04上安装Ice 3.6 for Python时出错 - Error Installing Ice 3.6 for Python on Ubuntu 16.04 每次打开终端时都出现“找不到命令‘pew’”(Ubuntu 16.04) - Getting "No command 'pew' found" every time I open the Terminal (Ubuntu 16.04) 为什么在安装 python 3.6 的 ratfun 包时出现“错误命令出错,退出状态为 1”? - Why am I getting an "ERROR Command errored out with exit status 1" when installing the ratfun package for python 3.6? 使用Macports安装python 3.6后在终端上使用python时出错 - Error using python with terminal after installing python 3.6 using macports 我尝试使用 Python 将 pdf 制作为图像转换器,但它显示错误 - I tried to make a pdf to image converter with Python but it shows an error 使用 pip 和 Python 3.6 在 Ubuntu 16.04 上安装 mysqlclient 时出错 - Error Installing mysqlclient on Ubuntu 16.04 using pip and Python 3.6 如何创建一个脚本,该脚本将接收用户输入并在使用python 3.6的终端命令中使用该脚本? - How do I create a script that will take user input and use it in a terminal command using python 3.6? 在ubuntu终端上运行python命令时出错 - error while running python command on ubuntu terminal 我在 python 中尝试了 case 语句,但每次我运行时我都会得到我的默认值 - i tried case statement in python but every time i run i got my default as a result 在适用于Python 3.6的Ubuntu 18.04上安装CNTK - Installing CNTK on Ubuntu 18.04 for Python 3.6
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM