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 / 问题 / 1357563
Accepted
MckPT
MckPT
Asked: 2021-08-13 03:15:32 +0800 CST2021-08-13 03:15:32 +0800 CST 2021-08-13 03:15:32 +0800 CST

Ubuntu Server 18.04.5 升级到 20.04 失败

  • 772

我的服务器快把我逼疯了,我正在尝试将当前的硬盘更改为新的 ssd,然后设置 Raid 和有效的备份系统。但这是另一个问题...

我已经将当前系统的副本复制到 SSD,所以我想,这是一个备份,让我尝试放入最新的 LTS,所以执行此操作的快速命令是:

sudo do-release-upgrade

失败并显示以下消息:

Checking for a new Ubuntu release  
Please install all available updates for your release before upgrading.

所以我不得不:

sudo apt-get update
sudo apt-get upgrade

第一次安装了一堆东西就停了或者我不得不重新启动,不记得以前做过这个。现在我有这个错误,当我运行升级时:

Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
You might want to run 'apt --fix-broken install' to correct these.  
The following packages have unmet dependencies.  
 lxd : Depends: lxd-client (= 3.0.3-0ubuntu1~18.04.1) but 1:0.9 is installed  
 lxd-client : Depends: lxd (>= 1:0.9) but 3.0.3-0ubuntu1~18.04.1 is installed  
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

所以我做了消息所说的:

sudo apt --fix-broken install

和新错误:

Setting up udev (245.4-4ubuntu3.10) ...  
Failed to restart udev.service: Unit systemd-udevd.service is not loaded properly: Exec format error.  
See system logs and 'systemctl status udev.service' for details.  
invoke-rc.d: initscript udev, action "restart" failed.  
 systemd-udevd.service - udev Kernel Device Manager  
   Loaded: error (Reason: Exec format error)  
   Active: inactive (dead)  
     Docs: man:systemd-udevd.service(8)  
           man:udev(7)  
Aug 12 11:36:10 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 11:39:00 AtomServer systemd[1]: systemd-udevd.service: Cannot add dependency job, ignoring: Unit systemd-udevd.service is not loaded properly: Exec format error.  
Aug 12 11:41:35 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 11:41:35 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 11:41:35 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 11:41:35 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:00:56 AtomServer systemd[1]: systemd-udevd.service: Cannot add dependency job, ignoring: Unit systemd-udevd.service is not loaded properly: Exec format error.  
Aug 12 12:00:59 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:00:59 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:01:00 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
dpkg: error processing package udev (--configure):  
 installed udev package post-installation script subprocess returned error exit status 1  
dpkg: dependency problems prevent configuration of snapd:  
 snapd depends on udev; however:  
  Package udev is not configured yet.  
dpkg: error processing package snapd (--configure):  
 dependency problems - leaving unconfigured  
No apport report written because the error message indicates it's a follow-up error from a previous failure.                                                                                                      Errors were encountered while processing:  
 udev  
 snapd  
E: Sub-process /usr/bin/dpkg returned an error code (1)

此时我无能为力,看了几篇帖子和类似的问题,发出了一些命令,比如:

dpkg --configure -a 
sudo dpkg --force-all -i /var/cache/apt/archives/udev_245.4-4ubuntu3.10_amd64.deb

同样的问题:

Setting up udev (245.4-4ubuntu3.10) ...  
Failed to restart udev.service: Unit systemd-udevd.service is not loaded properly: Exec format error.  
See system logs and 'systemctl status udev.service' for details.  
invoke-rc.d: initscript udev, action "restart" failed.  
 systemd-udevd.service - udev Kernel Device Manager  
   Loaded: error (Reason: Exec format error)  
   Active: inactive (dead)  
     Docs: man:systemd-udevd.service(8)  
           man:udev(7)  
Aug 12 12:00:59 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:01:00 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:09:00 AtomServer systemd[1]: systemd-udevd.service: Cannot add dependency job, ignoring: Unit systemd-udevd.service is not loaded properly: Exec format error.  
Aug 12 12:10:38 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:10:38 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:10:38 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:11:50 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:11:51 AtomServer systemd[1]: systemd-udevd.service: Cannot add dependency job, ignoring: Unit systemd-udevd.service is not loaded properly: Exec format error.  
Aug 12 12:11:51 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
Aug 12 12:11:51 AtomServer systemd[1]: /lib/systemd/system/systemd-udevd.service:26: Executable path is not absolute: udevadm control --reload --timeout 0  
dpkg: error processing package udev (--install):  
 installed udev package post-installation script subprocess returned error exit status 1  
Processing triggers for systemd (237-3ubuntu10.44) ...  
Processing triggers for ureadahead (0.100.0-21) ...  
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...  
Errors were encountered while processing:  
 udev  

有什么帮助吗?

谢谢

编辑 输出 apt-get 更新:

Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Fetched 328 kB in 2s (140 kB/s)
Reading package lists... Done
18.04
  • 1 1 个回答
  • 1411 Views

1 个回答

  • Voted
  1. Best Answer
    ExploitFate
    2021-08-13T03:47:13+08:002021-08-13T03:47:13+08:00

    更新:

    看起来您尝试安装错误的 udev 版本。对于仿生下载和安装http://mirrors.kernel.org/ubuntu/pool/main/s/systemd/udev_237-3ubuntu10.50_amd64.deb

    您可以尝试将行注释掉,/lib/systemd/system/systemd-udevd.service:26 直到升级完成

    sudo sed -i '/ExecReload/s/.*/#\0/g' /lib/systemd/system/systemd-udevd.service
    
    
    sudo systemctl daemon-reload
    
    

    比尝试再次升级

    sudo do-release-upgrade
    
    • 2

相关问题

  • Ubuntu 16.10 及更高版本中的 Nautilus 功能“创建链接”发生了什么变化?

  • 使用标准接口(使用 mimetype)以编程方式修改文件关联

  • 我可以从 Evince 拖放到 Thunderbird 吗?

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