AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1143604
Accepted
rmmariano
rmmariano
Asked: 2019-05-16 16:14:08 +0800 CST2019-05-16 16:14:08 +0800 CST 2019-05-16 16:14:08 +0800 CST

使用 sudo apt-get dist-upgrade 后终端被冻结

  • 772

我试图通过 更新我的 Ubuntu 16.04 sudo apt-get dist-upgrade,但现在终端被冻结(终端 1)。

我让它运行了一整天(超过 24 小时),我只是暂停了一次操作系统。

我已经尝试遵循互联网上的一些提示(例如这里),但不幸的是无济于事。

我在互联网上找到的一些代码,我无法使用它们,因为 Ubuntu 说它is locked by another process(终端 2)。

有人知道会发生什么吗?或者我能做些什么来解决它?因为我不知道是失败还是成功,或者它是否仍在运行,因为我已经尝试输入一些“enter”,但是没有任何反应,也没有在终端上创建一个新行,它是冻结。

先感谢您。

1号航站楼

$ sudo apt-get dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-4.4.0-148 linux-headers-4.4.0-148-generic
  linux-image-4.4.0-148-generic linux-modules-4.4.0-148-generic
  linux-modules-extra-4.4.0-148-generic linux-tools-4.4.0-148
  linux-tools-4.4.0-148-generic
The following packages will be upgraded:
  linux-generic linux-headers-generic linux-image-generic linux-tools-virtual
4 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 69,1 MB of archives.
After this operation, 314 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-modules-4.4.0-148-generic amd64 4.4.0-148.174 [12,0 MB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-4.4.0-148-generic amd64 4.4.0-148.174 [6.925 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-modules-extra-4.4.0-148-generic amd64 4.4.0-148.174 [36,6 MB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-generic amd64 4.4.0.148.156 [1.784 B]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-generic amd64 4.4.0.148.156 [2.750 B]
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-148 all 4.4.0-148.174 [9.982 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-148-generic amd64 4.4.0-148.174 [810 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-generic amd64 4.4.0.148.156 [2.582 B]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-tools-4.4.0-148 amd64 4.4.0-148.174 [2.850 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-tools-4.4.0-148-generic amd64 4.4.0-148.174 [2.598 B]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-tools-virtual amd64 4.4.0.148.156 [2.610 B]
Fetched 69,1 MB in 2min 11s (526 kB/s)                                         
Selecting previously unselected package linux-modules-4.4.0-148-generic.
(Reading database ... 302549 files and directories currently installed.)
Preparing to unpack .../linux-modules-4.4.0-148-generic_4.4.0-148.174_amd64.deb ...
Unpacking linux-modules-4.4.0-148-generic (4.4.0-148.174) ...
Selecting previously unselected package linux-image-4.4.0-148-generic.
Preparing to unpack .../linux-image-4.4.0-148-generic_4.4.0-148.174_amd64.deb ...
Unpacking linux-image-4.4.0-148-generic (4.4.0-148.174) ...
Selecting previously unselected package linux-modules-extra-4.4.0-148-generic.
Preparing to unpack .../linux-modules-extra-4.4.0-148-generic_4.4.0-148.174_amd64.deb ...
Unpacking linux-modules-extra-4.4.0-148-generic (4.4.0-148.174) ...
Preparing to unpack .../linux-generic_4.4.0.148.156_amd64.deb ...
Unpacking linux-generic (4.4.0.148.156) over (4.4.0.146.154) ...
Preparing to unpack .../linux-image-generic_4.4.0.148.156_amd64.deb ...
Unpacking linux-image-generic (4.4.0.148.156) over (4.4.0.146.154) ...
Selecting previously unselected package linux-headers-4.4.0-148.
Preparing to unpack .../linux-headers-4.4.0-148_4.4.0-148.174_all.deb ...
Unpacking linux-headers-4.4.0-148 (4.4.0-148.174) ...
Selecting previously unselected package linux-headers-4.4.0-148-generic.
Preparing to unpack .../linux-headers-4.4.0-148-generic_4.4.0-148.174_amd64.deb ...
Unpacking linux-headers-4.4.0-148-generic (4.4.0-148.174) ...
Preparing to unpack .../linux-headers-generic_4.4.0.148.156_amd64.deb ...
Unpacking linux-headers-generic (4.4.0.148.156) over (4.4.0.146.154) ...
Selecting previously unselected package linux-tools-4.4.0-148.
Preparing to unpack .../linux-tools-4.4.0-148_4.4.0-148.174_amd64.deb ...
Unpacking linux-tools-4.4.0-148 (4.4.0-148.174) ...
Selecting previously unselected package linux-tools-4.4.0-148-generic.
Preparing to unpack .../linux-tools-4.4.0-148-generic_4.4.0-148.174_amd64.deb ...
Unpacking linux-tools-4.4.0-148-generic (4.4.0-148.174) ...
Preparing to unpack .../linux-tools-virtual_4.4.0.148.156_amd64.deb ...
Unpacking linux-tools-virtual (4.4.0.148.156) over (4.4.0.146.154) ...
Setting up linux-modules-4.4.0-148-generic (4.4.0-148.174) ...
Setting up linux-image-4.4.0-148-generic (4.4.0-148.174) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-4.4.0-146-generic
I: /initrd.img.old is now a symlink to boot/initrd.img-4.4.0-146-generic
I: /vmlinuz is now a symlink to boot/vmlinuz-4.4.0-148-generic
I: /initrd.img is now a symlink to boot/initrd.img-4.4.0-148-generic
Setting up linux-modules-extra-4.4.0-148-generic (4.4.0-148.174) ...
Setting up linux-image-generic (4.4.0.148.156) ...
Setting up linux-headers-4.4.0-148 (4.4.0-148.174) ...
Setting up linux-headers-4.4.0-148-generic (4.4.0-148.174) ...

2号航站楼

$ sudo dpkg --configure --pending
dpkg: error: dpkg frontend is locked by another process

$ sudo dpkg --configure -a
dpkg: error: dpkg frontend is locked by another process

$ sudo apt -f install
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?
package-management upgrade kernel update-manager
  • 3 3 个回答
  • 1906 Views

3 个回答

  • Voted
  1. Best Answer
    rmmariano
    2019-06-08T10:57:39+08:002019-06-08T10:57:39+08:00

    我想分享我为解决问题所做的步骤。

    首先,我需要手动关闭终端。然后,我不得不删除锁:

    sudo rm /var/lib/dpkg/lock
    

    之后,我能够执行以下命令:

    sudo dpkg --configure --pending
    
    sudo dpkg --configure -a
    
    sudo apt install -f
    

    感谢帮助我解决这个问题的Linux 小组成员以及其他试图帮助我的人。

    • 2
  2. WinEunuuchs2Unix
    2019-05-21T13:47:03+08:002019-05-21T13:47:03+08:00

    几乎与这种情况相同:Ubuntu 18.04 卡在升级 linux-header

    有5个赞成票(现在6个)接受的答案如下


    TLDR:禁用安全启动。

    大约一个月前,我开始遇到同样的问题。对我来说,事实证明解决方案是禁用安全启动。自从我安装了 Ubuntu 18.04 以来,我已经禁用了安全启动,并且它升级没有任何问题。然而,大约一个月前,我更新了我的 BIOS,它重新启用了安全启动(当时我不知道)。升级冻结令人沮丧,我终于弄明白了,因为我的 VirtualBox 安装也无法正常工作。VirtualBox 的修复是禁用安全启动,这也修复了我的linux-headers-<version>-generic升级。

    如问题所述,它会在这里冻结:

    ...
    Setting up linux-headers-4.15.0-38-generic (4.15.0-38.41) ...
    

    禁用安全启动后,我得到:

    ...
    Setting up linux-headers-4.15.0-38-generic (4.15.0-38.41) ...
    /etc/kernel/header_postinst.d/dkms:
    Secure Boot not enabled on this system.
    ...
    done
    
    • 0
  3. Mattia
    2019-05-26T05:18:31+08:002019-05-26T05:18:31+08:00

    通过以下命令升级 Ubuntu 版本的另一种更简单的方法:

    do-release-upgrade
    
    • 0

相关问题

  • 如何回滚到 PHP 5.2?

  • 包管理器之间有什么区别?

  • 从 8.04 LTS 升级到 10.04 LTS 的体验?

  • 分销升级的合理途径

  • 在不使用标准升级系统的情况下升级有哪些替代方案?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve