是不是在使用ubuntu的时候特别是安装或更新的时候会出现下面的情况:  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 rm /var/lib/apt/lists/lock

sudo rm /var/cache/apt/archives/lock

在大部分情况下,问题的原因在于其它的程序如系统的自动更新、新立得等正在使用apt-get进程,所以解决方法也就是将这一进程关闭。

具体如下:

1、ps-aux 查出apt-get进程的PID,通常是一个四位数字。

2、用sudo kill PID代码 杀死进程

3、用sudo apt-get update,sudo apt-get dist-upgrade升级。

方法一:

执行一下 sudo dpkg --configure -a

方法二(亲测可以用):

sudo rm /var/lib/apt/lists/lock

方法三:

1、ps-aux 查出apt-get进程的PID,

2、用sudo kill PID代码 杀死进程(我都是找出带apt字样的进程格杀勿论)

解决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?的更多相关文章

  1. Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration di

    alexander@alexander-virtual-machine:~$ sudo apt-get install -y httpdE: Could not get lock /var/lib/d ...

  2. 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?

    E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: Unable to l ...

  3. 错误笔记: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration di

    亲测可用 --jack alexander@alexander-virtual-machine:~$ sudo apt-get install -y httpdE: Could not get loc ...

  4. ubuntu 报错E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unav E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process us

    1.配置xshell,查看虚拟机中ubuntu中网络ip ifconfig 报错 Command 'ifconfig' not found, but can be installed with: su ...

  5. E: could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporary unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is an other process using it

    1. 问题详细提示如下: E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarly unava ...

  6. 转connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)

    网站常出现502 bad gateway,程序没有问题. 根据nginx日志:connect() to unix:/var/run/php-fpm.sock failed (11: Resource ...

  7. connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)

    nginx + php做服务,在高并发的时候会出现一些错误  connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporar ...

  8. Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) 解决办法

    1:我遇到的问题: 在开机运行apt install vim 命令的时候,如下报错: 2:参考博客: 在Ubuntu中,有时候运用sudo  apt-get install 安装软件时,会出现一下的情 ...

  9. E:Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)

    出现这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用.而导致资源被锁的原因,可能是上次安装时没正常完成,而导致出现此状况. 解决方法:输入以下命令 sudo rm /var/cache/ ...

随机推荐

  1. 浅谈Fluent Ribbon 中的SplitButton

    Fluent Ribbon Control Suite 就不做介绍了,网上的例子比较多,类似Office2007及以后版本的图形界面(菜单栏).官网地址:https://github.com/flue ...

  2. 安装IIS步骤图解

    这几日好些网友来找iis安装包,但是因为新浪爱问的共享资料已关闭导致下载链接不可用,笔者在新浪微盘的备份资料只有5.1版,现共享链接如下: IIS5.1 for windows xp下载链接http: ...

  3. nginx中文文档

    http://www.nginx.cn/doc/ LNMP :https://lnmp.org/faq/lnmp-vhost-add-howto.html 配置详解 配置详解2

  4. mysql服务器参数

    mysql服务器参数: 配置是从上往下读取,同一个参数项,后边的配置项会覆盖前边的配置项 mysql获取配置信息路径: 命令行参数    mysqld_safe  --datadir=/data/sq ...

  5. Go语言之旅:包

    每个 Go 程序都是由一些包组成的. 原文地址:https://golang-book.readthedocs.io 欢迎关注我们的公众号:小菜学编程 (coding-fan) 程序从 main 包开 ...

  6. Linux-- su和sudo 切换用户

    su 切换用户 用法:su [选项] [-] [用户 [参数]... ] - :以 login-shell 方式进行登录 不加 - :以 no-login-shell 方式进行登录 -c:只进行一次在 ...

  7. 从对集合数据去重到Distinct源码分析

    今天在写代码的时候要对数据进行去重,正打算使用Distinct方法的时候,发现这个用了这么久的东西,竟然不知道它是怎么实现的,于是就有了这篇文章. 使用的.net core2.0 1.需求 假如我们有 ...

  8. org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping

    org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping 原因:yml文件格式错误,此文件要求严格要求格式 如节 ...

  9. Android环境搭建及Ionic打包(win7)

    本人刚刚接触Ionic3,初步进行打包操作,将其遇到的问题和整个流程记录下载,方便以后的巩固,也为小白们提供一个参考.因本人没有appleヽ(ー_ー)ノ,而且使用的是WIN7系统,所以暂时只提供了WI ...

  10. Vue.js——十分钟入门Vuex

    一. 什么是Vuex?   Vuex Vuex是一个专门为Vue.js应用程序开发的状态管理模式, 它采用集中式存储管理所有组件的公共状态, 并以相应的规则保证状态以一种可预测的方式发生变化. Vue ...