16.04에서 18.04로 업그레이드하면 시스템이 손상되었습니다.

16.04에서 18.04로 업그레이드하면 시스템이 손상되었습니다.

16.04에서 18.04로 업그레이드한 후 마지막에 다음 메시지가 표시되었습니다.

The upgrade has completed but there were errors during the upgrade 
process. 

To continue please press [ENTER]

[ENTER]를 눌렀다

이제 apt update / apt 업그레이드를 수행하면 다음 메시지가 나타납니다.

The following packages have unmet dependencies:
 systemd : Depends: libsystemd0 (= 229-4ubuntu21.31) but 237-3ubuntu10.48 is installed

찾는 곳:https://packages.ubuntu.com/bionic/libs/ 어쨌든 18.04의 libsystemd0에 대해 다음이 표시됩니다. 그래서 시스템이 종속성이 229-4ubuntu21.31이어야 한다고 믿는 이유가 확실하지 않습니다.

libsystemd0 (237-3ubuntu10.38 [amd64, i386], 237-3ubuntu10 [arm64, armhf, ppc64el, s390x]) [security]
    systemd utility library

적절한 업그레이드가 끝나면 다음과 같이 표시됩니다.

You might want to run 'apt-get -f install' to correct these.

이것을 실행하면 다음과 같은 결과를 얻습니다.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  cgmanager libargon2-0 libcryptsetup12 libgd3 libip4tc0 libjson-c3 libkadm5clnt-mit9 libluajit-5.1-2 libluajit-5.1-common libvpx3 libxpm4 nginx-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  upstart
Suggested packages:
  graphviz upstart-monitor
The following packages will be REMOVED:
  init libpam-systemd systemd systemd-shim systemd-sysv ubuntu-standard
The following NEW packages will be installed:
  upstart
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  init systemd-sysv (due to init)
0 upgraded, 1 newly installed, 6 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/392 kB of archives.
After this operation, 18.1 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

분명히 아주 끔찍한 일이 일어났습니다.

나는 여기에서 약간 벗어났으며 몇 가지 지침/다음 단계에 감사하겠습니다.

감사해요


추가 : NOrbert가 요청한대로 출력

nexargi@server-02:~$ apt-cache policy systemd libsystemd0 init systemd-sysv
systemd:
  Installed: 229-4ubuntu21.31
  Candidate: 229-4ubuntu21.31
  Version table:
 *** 229-4ubuntu21.31 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     229-4ubuntu21.27 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     229-4ubuntu4 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libsystemd0:
  Installed: 237-3ubuntu10.48
  Candidate: 237-3ubuntu10.48
  Version table:
 *** 237-3ubuntu10.48 100
        100 /var/lib/dpkg/status
     229-4ubuntu21.31 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     229-4ubuntu21.27 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     229-4ubuntu4 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
init:
  Installed: 1.29ubuntu4
  Candidate: 1.29ubuntu4
  Version table:
 *** 1.29ubuntu4 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.29ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
systemd-sysv:
  Installed: 229-4ubuntu21.31
  Candidate: 229-4ubuntu21.31
  Version table:
 *** 229-4ubuntu21.31 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     229-4ubuntu21.27 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     229-4ubuntu4 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

NOrbert의 요청에 따라 Pastebin에 대한 링크를 포함하도록 편집되었습니다. @NOrbert 이 링크는 16.04가 복원된 직후에 찍은 것입니다. 즉, 릴리스 업그레이드 전의 16.04 상태를 나타냅니다.

grep -r ^deb /etc/apt --include=*.list https://pastebin.com/85qJeYws

적절한 캐시 정책 https://pastebin.com/q8S47v1e

dpkg -l https://pastebin.com/Zp999iuF

답변1

libsystemd0의 최신 버전이 있습니다 .어쩌면 어딘가. 다운그레이드하려면 아래 명령을 사용하세요.

sudo apt-get install libsystemd0=229-4ubuntu21.31

그런 다음 16.04 LTS로 업그레이드를 설치합니다.

sudo apt-get update
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get dist-upgrade # to get newer dependencies

미래에 발생할 수 있는 문제에 대한 좋은 도구를 가지려면 다음과 같이 Aptitude를 설치하십시오.

sudo apt-get install aptitude

그런 다음 재부팅하고 평소처럼 시스템 업그레이드 절차를 18.04 LTS로 시작합니다.

관련 정보