Ubuntu18下sudo apt install xxx出现问题
当执行sudo apt install rpm时失败(apt-get也失败),输出如下报错信息:
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-get进行下载的操作。 这可能与我上次挂起时的命令行未关闭有关系,但现在找不到了。
据说重启可以解决此问题,亲测后无效。于是又找到另外一种方法:
先搜索所以运行的线程:
ps -A | grep apt-get
得到的输出为:

图中的数字(6852)应该就是线程号,使用kill命令将其关闭:
sudo kill 6852
可以在另一个终端中看到线程被终止:

然后关闭当前终端,重新打开一个就可以sudo apt install xxx了。
Ubuntu18下sudo apt install xxx出现问题的更多相关文章
- Command 'ifconfig' not found, but can be installed with: sudo apt install net-tools
然后按照错误信息安安装网络工具: sudo apt install net-tools shl@shl-tx:~$ sudo apt install net-tools正在读取软件包列表... 完成正 ...
- sudo apt install libreadline-dev Reading package lists... Error!
luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ luo@luo-ThinkPad-W540:~$ ...
- 【亲测有效】Ubuntu18.04 sudo apt update无法解析域名的解决方案
问题描述如下: 拿起了封尘已久的ThinkPad,输入 sudo apt update 的时候,发现这个命令变得不好使了,具体出现的问题如下图所示: #( 09/08/19@ 2:44下午 )( py ...
- sudo apt install net-tools [sudo] zyw 的密码: 正在读取软件包列表... 完成 正在分析软件包的依赖关系树,正在读取状态信息... 完成,没有可用的软件包 net-tools,但是它被其它的软件包引用了。这可能意味着这个缺失的软件包可能已被废弃,或者只能在其他发布源中找到
截图: 先执行: sudo apt-get update 再执行: sudo apt install net-tools 即可安装成功!!
- Ubuntu 16.04 安装 Wireshark分析tcpdump的pcap包——sudo apt install wireshark-qt
tcpdump 的抓包保存到文件的命令参数是-w xxx.cap 抓eth1的包 tcpdump -i eth1 -w /tmp/xxx.cap 抓 192.168.1.123的包 tc ...
- kali sudo apt install 无法定位软件包
在etc/apt 的sources.list 添加镜像源 debhttp://http.kali.org/kali kali-rolling main non-free contrib 或 deb ...
- Ubuntu下sudo apt-get install vim 失败的解决办法
Ubuntu下 执行命令:sudo apt-get install vim 失败 解决办法: 更新一下,命令:sudo apt-get update 再安装即可成功:sudo apt-get inst ...
- DNS隧道之DNS2TCP使用心得教程——是可以用来穿透qiang的,ubuntu下直接apt install dns2tcp
DNS隧道之DNS2TCP使用心得教程 转自:http://blog.creke.net/750.html DNS2TCP是在上次DNS隧道大检阅时提到的一个DNS隧道. 在2010年6月的更新(也是 ...
- Command 'ifconfig' not found, but can be installed with: sudo apt install net-tools VM Ubuntu 解决方案
VMware下安装的Ubuntu 一开始由于Firefox连不上网,然后通过看了https://www.bbsmax.com/A/VGzlEGYJbq/这个文章之后,自己也测了一下,确实好用 但是if ...
随机推荐
- 回车\r与换行\n
在计算机出现之前,有一种电传机械打字机,每秒可以打10个字符.但是有一个问题,就是打满一行后,需要进行换行,换行是需要0.2秒.如果这时有字符传入,就会丢失两个字符.为了解决这个问题,便定义了两个字符 ...
- VC++ 实现程序重启
转载:https://blog.csdn.net/what951006/article/details/72729448 一.创建一个Win32项目 二.窗口处理函数中,Create窗口时创建一个按钮 ...
- Mysql 5.7--ubuntu18.04 安装过程及遇到的问题
Mysql 5.7安装过程 1. 下载mysql的apt-config文件 a. https://dev.mysql.com/downloads/file/?id=477124 b. 点击downlo ...
- qt界面操作
//控制死窗体 int width = this->geometry().width(); int height = this->geometry().height(); this-> ...
- bootstrap:modal & iframe
form提交绑定到特定的iframe & form的结果在dialog上显示 form:target属性 <!-- when the form is submitted, the ser ...
- Log4net详细说明
1.概述 log4net是.Net下一个非常优秀的开源日志记录组件.log4net记录日志的功能非常强大.它可以将日志分不同的等级,以不同的格式,输出到不同的媒介.本文主要是介绍如何在Visual S ...
- 1047 Integer Inquiry
String 大数加法模板 #include<stdio.h> #include<string> #include<iostream> using namespac ...
- vim实现实时自动保存
进https://www.vim.org/scripts/script.php?script_id=4521网站下载vim -auto-save wget https://www.vim.org/s ...
- 2 - Binary Search & LogN Algorithm
254. Drop Eggs https://www.lintcode.com/problem/drop-eggs/description?_from=ladder&&fromId=1 ...
- mysql查表的时候报错:java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timest
在spark项目中读取mysql中的数据的时候,发生了报错: 原因:主要是因为数据库中有一些字段为null,无法进行转换: 上面字段那种,我的inserttime字段类型为timestamp类型,不为 ...