Could not get lock /var/lib/dpkg/lock-frontend

使用apt安装时报错:
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock*
sudo dpkg --configure -a
sudo apt update

————————————————
版权声明:本文为CSDN博主「Bungehurst」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/lun55423/article/details/108907779

ubuntu更换默认python版本

ls /usr/bin/python*
vim ~/.bashrc
alias python='/usr/bin/python3.5'
$ . ~/.bashrc  

错误信息:
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘localhost’, port=9000): Max retries exceeded with url: /events
(Caused by NewConnectionError(‘: Failed to establish a new connection: [Errno 111] Connection refused’))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘localhost’, port=9000): Max retries exceeded with url: /events (Caused by NewConnectionError(‘: Failed to establish a new connection: [Errno 111] Connection refused’))

错误的原因:

没有连上Visdom 服务器,造成的原因有两种:

原因1、服务器没有打开;

python -m visdom.server 

显示:
Downloading scripts. It might take a while.
It’s Alive!
INFO:root:Application Started
You can navigate to http://localhost:8097
不要关闭终端这个窗口

再打开浏览器:

输入网址 http://localhost:8097 就会看到visdom界面

原因2、代码中调用的服务器端口不对。

vis = visdom.Visdom(server='http://localhost', port=8097)

你可能感兴趣的:(ubuntu,linux,vim)