`
luliangok
  • 浏览: 782277 次
文章分类
社区版块
存档分类
最新评论

ubuntu apt-get 解锁:Could not get lock /var/lib/apt/lists/lock

 
阅读更多

ubuntu server安装jre时,SSH窗口不知道何时关闭了,重新开了一个SSH后,发现 ps -aux | grep apt-get install 那个进程还在,
现在你想执行安装程序
通过终端安装程序sudo apt-get install ***肯定出错:
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?

解决的办法其实很简单:
在终端中敲入以下两句
sudo kill 刚才ps -aux | grep apt-get install 那个进程的pid
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

问题解决。
分享到:
评论

相关推荐

    shit:Sudo 历史调用工具

    [user@host] $ apt-get updateE: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)E: Unable to lock directory /var/lib/apt/lists/E: Could not open lock file /var/lib/dpkg/...

    解决Ubuntu更新apt-get时报错哈希码不匹配

    背景 昨晚更新apt-get时由于太晚要睡觉,所以还没下载完就ctrl-c中断、关机了。今天重新更新时,报错如下 ...rm -rf /var/lib/apt/lists/* apt-get clean && sudo apt-get update 作者:coder_szc

    docker-update-check:检查Docker容器是否需要更新

    Docker更新检查运行服务器意味着您必须跟上错误修复和安全更新。... 为此, apt-check将/var/lib/dpkg/status文件中找到的已安装软件包列表与/var/lib/apt/lists/软件包列表进行比较。 软件包管理工

    dionaea-honeypot:虚拟机Ubuntu服务器12.04 x64安装dionaea honeypot

    sudo rm -rf /var/lib/apt/lists/* sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade 安装特权sbb: sudo apt-get install libudns-dev libglib2.0-dev libssl-dev libc

    ubuntu16.04安装python3.6.docx

    Reading package lists... Done E: The repository 'http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial Release' does not have a Release file. N: Updating from such a repository can't be done ...

    Get Programming - Learn to code with Python.epub

    Lesson 28 - Aliasing and copying lists and dictionaries Lesson 29 - Capstone project: document similarity UNIT 7 - MAKING YOUR OWN OBJECT TYPES BY USING OBJECT-ORIENTED PROGRAMMING Lesson 30 - Making...

    ansible-carbon:有助于管理 Carbon 安装的角色

    碳有助于管理 Carbon 安装的角色。 它使用defaults变量来生成主要的 Carbon 和存储模式配置文件。例子 ---# Default installation- hosts: myhost1 roles: - ...WHITELISTS_DIR: /var/lib/carbon/lists/ CONF_DIR:

    a11y-lists-of-lists:与可访问性相关的问题列表的列表

    列表的可访问性列表 一般资源 开发和测试资源 Web轴:可访问的日期选择器 ICT测试201车间测试工具 唐娜·邦加(Donna Bungard)的辅助工具清单不完整 W3C的Web可访问性评估工具列表 CivicActions辅助功能列表 ...

    wookie-lists:微服务读书俱乐部的用户列表

    GET /api/lists/:listId POST /api/lists/ (w/ {name: listName} json body, or URL encoded version of the same) DELETE /api/lists/:listId PUT /api/lists/:listId/users/:userId DELETE /api/lists/:listId/...

    recommended-problems

    https://leetcode.com/problems/merge-two-sorted-lists/ 2D阵列 https://leetcode.com/problems/spiral-matrix/ https://leetcode.com/problems/search-a-2d-matrix/ ...

    docker-ubuntu:片段和示例 Dockerfile 可帮助更快地构建基于 Ubuntu 的映像

    docker-ubuntu ... RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 保持容器运行 CMD tail -f /dev/null 更改时区 RUN echo "Asia/Shanghai" > /etc/timezone RUN dpkg-re

    ko-lists:淘汰赛名单

    npm install ko-lists --save 或通过脚本标签将ko-lists.js添加到浏览器中。 < script src =" scripts/ko-lists.js " > </ script > <!-- Or use the github CDN --> < script src =" ...

    1063-数据结构:T-Th 11:00-12:20

    1063数据结构 名册 一般课程信息 天数: TTH 11:00 am-12 : 20 pm 所在地: BO 320 8月27日星期二-12月5日星期四 劳动节:周一至9月2日第二 感恩节: 11月27日星期三-12月1日星期日 10月28日星期一 ...

    todoApi

    GET localhost:8888 / todoApi / lists /#:按ID获取列表,其中#是目标列表ID POST localhost:8888 / todoApi / lists:接受一个“名称”字符串并创建一个新的待办事项列表 PUT localhost:8888 / todoApi / ...

    spring 最新框架jar

    [team members]: https://twitter.com/springframework/lists/team/members [The Spring Blog]: http://spring.io/blog/ [news feed]: http://spring.io/blog/category/news [Apache License]: ...

    react-native-web-lists:React Native用于列表的Web实现

    react-native-web-lists React Native用于列表的Web实现 该软件包使用旧版实现(ListView)。 入门 $ npm install react-native-web-lists --save 别名打包您的webpack配置中: resolve: { alias: { 'react-...

    assertj-core-3.11.1.jar

    assertj-core-3.11.1.jar

    Ubuntu | 安装vim遇到的问题

    一旦你运行了 apt-get 或者 apt 命令,锁定文件将会创建于 /var/lib/apt/lists/、/var/lib/dpkg/、/var/cache/apt/archives/ 中。 这有助于运行中的 apt-get 或者 apt进程能够避免被其它需要使用相同文件的用户...

    Sortable前端框架

    Sortable is a <s>minimalist</s> JavaScript library for reorderable drag-and-drop lists. Demo: http://rubaxa.github.io/Sortable/ ## Features * Supports touch devices and [modern]...

    list-of-lists:有用的开源项目和开发人员工具列表的元列表

    列表列表 有用的开源项目和开发人员工具列表的元列表 工具 系统管理工具: : 字体端工具: : 编译为 JS 的语言列表: : 使用前端工具美化: : RSS 阅读器列表: : 作业队列、消息队列和其他队列列表 - ...

Global site tag (gtag.js) - Google Analytics