美文网首页
apt报错:无法获得锁 /var/lib/dpkg/lock-f

apt报错:无法获得锁 /var/lib/dpkg/lock-f

作者: August________ | 来源:发表于2019-11-08 23:24 被阅读0次

    apt报错:无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用

    • apt安装报错
    # apt-get install bridge-utils
    E: 无法获得锁 /var/lib/dpkg/lock-frontend - open (11: 资源暂时不可用)
    E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
    
    
    • 解决办法两种办法
    1. 删除apt的进程
    # ps -ef | grep apt
    root       3334      1  0 23:19 ?        00:00:00 /bin/sh /usr/lib/apt/apt.systemd.daily install
    root       3348   3334  0 23:19 ?        00:00:00 /bin/sh /usr/lib/apt/apt.systemd.daily lock_is_held install
    _apt       3431   3380  0 23:20 ?        00:00:00 /usr/lib/apt/methods/http
    root       3435   3059  0 23:20 pts/8    00:00:00 grep --color=auto apt
    # kill -9 3334 3348 3431
    # ps -ef | grep apt
    root       3440   3059  0 23:21 pts/8    00:00:00 grep --color=auto apt
    
    
    1. 删除解锁文件
    # rm /var/cache/apt/archives/lock 
    # rm /var/lib/dpkg/lock
    
    

    相关文章

      网友评论

          本文标题:apt报错:无法获得锁 /var/lib/dpkg/lock-f

          本文链接:https://www.haomeiwen.com/subject/kekgbctx.html