공식 DISTRIB GIVE 마이그레이션 스크립트를 사용하세요.
migrate2rocky.sh -r
그러면 실패하고 distrib의 버전이 더 이상 관리되지 않기 때문에 centOS로 돌아갈 수 없습니다.
실패한 마이그레이션 스크립트를 실행한 후 dnf 베이스를 다시 빌드해 보았습니다(센트OS 8)
시작했지만 실패했습니다"릴리스 버전을 감지할 수 없습니다(릴리스 버전을 지정하려면 '--releasever'를 사용하십시오)"
os-release 및 redhat-release가 지워진 것을 확인합니다."", 아무것도 없습니다.
모든 것을 수정하기 위해 dnf makecache 및 dnf update를 실행하기 위해 버전을 다시 감지해야 했지만 할 수 없었습니다. 아래를 참조하세요.
첫 번째 dnf 오류 발견
yum repolist list
Unable to detect release version (use '--releasever' to specify release version)
dnf 문제
dnf makecache
Unable to detect release version (use '--releasever' to specify release version)
Extra Packages for Enterprise Linux Modular $releasever - x86_64 127 kB/s | 76 kB 00:00
Errors during downloading metadata for repository 'epel-modular':
- Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-$releasever&arch=x86_64&infra=$infra&content=$contentdir (IP: 2a05:d014:10:7803:f774:4d7c:e277:a457)
- Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-$releasever&arch=x86_64&infra=$infra&content=$contentdir (IP: 2a05:d01c:c6a:cc01:269:da52:9ae1:43e6)
Error: Failed to download metadata for repo 'epel-modular': Cannot prepare internal mirrorlist: Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=epel-modular-$releasever&arch=x86_64&infra=$infra&content=$contentdir (IP: 2a05:d014:10:7803:f774:4d7c:e277:a457)
마이그레이션 프로세스는 다음과 같습니다.
wget https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
--2021-08-16 20:03:42-- https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
Résolution de raw.githubusercontent.com (raw.githubusercontent.com)… 185.199.110.133, 185.199.109.133, 185.199.108.133, ...
Connexion à raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 37406 (37K) [text/plain]
Sauvegarde en : « migrate2rocky.sh.2 »
migrate2rocky.sh.2 100%[=====================================================================================================>] 36,53K --.-KB/s ds 0,01s
2021-08-16 20:03:42 (2,83 MB/s) — « migrate2rocky.sh.2 » sauvegardé [37406/37406]
bash ./migrate2rocky.sh -r
표적: 재설치 없이 사용 가능한 centOS8 검색
답변1
dnf/yum 및 기본 OS 버전 파일/변수를 복원하기 위해 수행한 작업은 다음과 같습니다.
wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/dnf-4.4.2-11.el8.noarch.rpm
rpm -ivh ./dnf-4.4.2-11.el8.noarch.rpm --force
dnf update
Distrib 패키지 관리에서 여전히 오류가 발생하고 dnf가 여전히 작동하지 않습니다.
그래서 나는 최소한의 패키지를 얻습니다.
wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-linux-release-8.4-1.2105.el8.noarch.rpm
wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm
rpm -ivh ./centos-linux-release-8.4-1.2105.el8.noarch.rpm ./centos-linux-repos-8-2.el8.noarch.rpm --force
gpg 키가 필요하기 때문에 설치할 수 없습니다.
wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm
rpm -ivh ./centos-gpg-keys-8-2.el8.noarch.rpm --force
그런 다음 기본 패키지를 다시 설치해 볼 수 있습니다.
rpm -ivh ./centos-linux-release-8.4-1.2105.el8.noarch.rpm ./centos-linux-repos-8-2.el8.noarch.rpm --force
dnf makecache
dnf update
rpm --initdb
dnf install epel-release -y # not sure this step was needed
그런 다음 재부팅하고 완전히 작동하는 CentOS-8로 돌아왔습니다.
참고: 공식(release rocky) git에서 migration2rocky.sh 스크립트를 다시 실행해 보았으나 여전히 실패했습니다.
Running dnf update before we attempt the migration.
Last metadata expiration check: 0:00:47 ago on Mon Aug 16 20:44:42 2021.
Dependencies resolved.
Nothing to do.
Complete!
rpm: no packages given for erase
Could not remove packages from the rpm db:
An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.
A log of this installation can be found at /var/log/migrate2rocky.log
단계
하지만 이제는 더 이상 아무것도 깨지지 않습니다.
그런 다음 rocky distrib의 distrib 스크립트 개발자 git에서 티켓을 열었습니다.
좋습니다. 그러면 다시 돌아와 최종 해결책에 대한 답변을 여기에서 확인하세요.
1648/1653): rocky-logos-84.5-8.el8.x86_64.rpm 8.2 MB/s | 328 kB 00:00
(1649/1653): rocky-backgrounds-84.5-8.el8.noarc 2.3 MB/s | 330 kB 00:00
(1650/1653): libsndfile-1.0.28-10.el8_4.1.i686. 2.9 MB/s | 217 kB 00:00
(1651/1653): rpmfusion-nonfree-appstream-data-8 469 kB/s | 39 kB 00:00
(1652/1653): libsndfile-1.0.28-10.el8_4.1.x86_6 8.9 MB/s | 192 kB 00:00
(1653/1653): rpmfusion-free-appstream-data-8-1. 502 kB/s | 69 kB 00:00
--------------------------------------------------------------------------------
Total 25 MB/s | 1.6 GB 01:04
Running transaction check
Error: transaction check vs depsolve:
libdbusmenu(x86-32) = 16.04.0-4.el7 is needed by (installed) libdbusmenu-gtk2-16.04.0-4.el7.i686
To diagnose the problem, try running: 'rpm -Va --nofiles --nodigest'.
You probably have corrupted RPMDB, running 'rpm --rebuilddb' might fix the issue.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error during distro-sync.
An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.
A log of this installation can be found at /var/log/migrate2rocky.log
여기에 특정 패키지 종속성 문제가 있는 것 같아서 작동하는 Centos를 다시 빌드했습니다.
[root@BSU ~]# rpm -ivh --nodeps centos-linux-repos-8-2.el8.noarch.rpm --force
Verifying... ################################# [100%]
Préparation... ################################# [100%]
Mise à jour / installation...
1:centos-linux-repos-8-2.el8 ################################# [100%]
[root@BSU ~]# rpm --force --nodeps -ivh 'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm' 'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm' 'http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm' 'http://mirror.centos.org/centos/8.4.2105/BaseOS/x86_64/os/Packages/dnf-data-4.4.2-11.el8.noarch.rpm' 'http://mirror.centos.org/centos/8.4.2105/BaseOS/x86_64/os/Packages/dnf-4.4.2-11.el8.noarch.rpm' 'http://mirror.centos.org/centos/8.4.2105/BaseOS/x86_64/os/Packages/dnf-data-4.4.2-11.el8.noarch.rpm'
Récupération de http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-release-8.3-1.2011.el8.noarch.rpm
Récupération de http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm
Récupération de http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm
Récupération de http://mirror.centos.org/centos/8.4.2105/BaseOS/x86_64/os/Packages/dnf-data-4.4.2-11.el8.noarch.rpm
Récupération de http://mirror.centos.org/centos/8.4.2105/BaseOS/x86_64/os/Packages/dnf-4.4.2-11.el8.noarch.rpm
Récupération de http://mirror.centos.org/centos/8.4.2105/BaseOS/x86_64/os/Packages/dnf-data-4.4.2-11.el8.noarch.rpm
attention : le paquet dnf-data-4.4.2-11.el8.noarch a déjà été rajouté, dnf-data-4.4.2-11.el8.noarch ignoré
Verifying... ################################# [100%]
Préparation... ################################# [100%]
Mise à jour / installation...
1:centos-gpg-keys-1:8-2.el8 ################################# [ 20%]
2:centos-linux-repos-8-2.el8 ################################# [ 40%]
3:centos-linux-release-8.3-1.2011.e################################# [ 60%]
4:dnf-4.4.2-11.el8 ################################# [ 80%]
5:dnf-data-4.4.2-11.el8 ################################# [100%]
[root@BSU ~]# dnf makecache
CentOS Linux 8 - AppStream 14 MB/s | 8.8 MB 00:00
CentOS Linux 8 - BaseOS 24 MB/s | 5.6 MB 00:00
CentOS Linux 8 - Extras 8.2 kB/s | 10 kB 00:01
Extra Packages for Enterprise Linux Modular 8 - x86_64 2.9 MB/s | 931 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 19 MB/s | 10 MB 00:00
RPM Fusion for EL 8 - Free - Updates 20 kB/s | 3.7 kB 00:00
RPM Fusion for EL 8 - Nonfree - Updates 35 kB/s | 3.7 kB 00:00
Cache des métadonnées créé.
[root@BSU ~]# dnf search libdbusmenu
Dernière vérification de l’expiration des métadonnées effectuée il y a 0:00:36 le ven. 27 août 2021 11:51:18 CEST.
========================================================================= Nom correspond exactement à : libdbusmenu ==========================================================================
libdbusmenu.x86_64 : Library for passing menus over DBus
libdbusmenu.i686 : Library for passing menus over DBus
=============================================================================== Nom correspond à : libdbusmenu ===============================================================================
libdbusmenu-gtk2.i686 : Library for passing menus over DBus - Development files - GTK+2 version
libdbusmenu-gtk3.i686 : Library for passing menus over DBus - Development files - GTK+3 version
libdbusmenu-gtk3.x86_64 : Library for passing menus over DBus - Development files - GTK+3 version
[root@BSU ~]# dnf remove libdbusmenu-gtk2.i686
Dépendances résolues.
==============================================================================================================================================================================================
Paquet Architecture Version Dépôt Taille
==============================================================================================================================================================================================
Suppression:
libdbusmenu-gtk2 i686 16.04.0-4.el7 @System 80 k
Résumé de la transaction
==============================================================================================================================================================================================
Supprimer 1 Paquet
Espace libéré : 80 k
Voulez-vous continuer ? [o/N] : o
Test de la transaction
La vérification de la transaction a réussi.
Lancement de la transaction de test
Transaction de test réussie.
Exécution de la transaction
Préparation : 1/1
Suppression de : libdbusmenu-gtk2-16.04.0-4.el7.i686 1/1
Exécution du scriptlet: libdbusmenu-gtk2-16.04.0-4.el7.i686 1/1
Vérification de : libdbusmenu-gtk2-16.04.0-4.el7.i686 1/1
Installed products updated.
Supprimé:
libdbusmenu-gtk2-16.04.0-4.el7.i686
Terminé !
[root@BSU ~]#
정말 역사적인 내용이라 더 이상 필요하지 않다고 생각해서 삭제했습니다.
그런 다음 migration2rocky -r &를 다시 실행하고 있는데 완료될 때까지 기다리는 것이 괜찮은 것 같지만 지금은 괜찮습니다.
주요 문제비자동 감지에 관한 것입니다.epel-다음 버전
마지막 기간로컬 특정 패키지를 제거한 다음 배포판을 다시 빌드하고 마지막 마이그레이션 프로세스를 다시 실행하는 것입니다.
최종 조치릴리스에 대한 병합 요청 발행