如果你有旧的Fedora版本要升级到最新的Fedora版本可以采用下面的方法,比如从Fedora 21升级到Fedora 28就可以使用下面的步骤操作。根据Fedora官方指南,每次建议只升级一个版本,每次最多只能升级两个版本。
注:很多人以前安装过Linux,可是一直没用,等到要用时所用的版本已经过时了,所以升级是要必要的。
查看当前系统版本,使用的是旧的Fedora 21: $ uname -a Linux localhost.localdomain 4.1.13-100.fc21.x86_64 #1 SMP Tue Nov 10 13:13:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Fedora 21升级Fedora 28的全部步骤如下: 1.Fedora 21先升级Fedora 22 1].耗时很长,建议在较好的网络环境下进行: $ sudo dnf upgrade --refresh $ sudo dnf install dnf-plugin-system-upgrade $ sudo dnf system-upgrade download --refresh --releasever=22 --allowerasing --setopt=keepcache=1 2].经常遇到的问题之一:提示GPG-KEY缺失: Install 257 Packages Upgrade 1646 Packages Remove 7 Packages Downgrade 4 Packages Total download size: 1.4 G warning: /var/lib/dnf/system-upgrade/geos-3.4.2-3.fc22.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8e1431d5: NOKEY Curl error (37): Couldn't read a file:// file for file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-x86_64 [Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-x86_64] 3].下载RPM-GPG-KEY,下载links: $ sudo rpm --import '/home/brian/Downloads/RPM-GPG-KEY-rpmfusion-free-fedora-22' $ sudo rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-22 4].更名: $ sudo cp RPM-GPG-KEY-fedora-22-x86_64 RPM-GPG-KEY-fedora-x86_64 5].重新安装: $ sudo dnf system-upgrade download --refresh --releasever=22 --allowerasing --setopt=keepcache=1 6].根据提示导入key: warning: /var/lib/dnf/system-upgrade/geos-3.4.2-3.fc22.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8e1431d5: NOKEY Importing GPG key 0x8E1431D5: Userid : "Fedora (22) <fedora@fedoraproject.org>" Fingerprint: C527 EA07 A934 9B58 9C35 E1BF 11AD C094 8E14 31D5 From : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-x86_64 Is this ok [y/N]: y Key imported successfully ... 启动安装事务,需要很长的时间,请耐心等待。 7].更新+重启动: $ sudo dnf system-upgrade reboot
2.Fedora 22再升级Fedora 23 Fedora 22升级Fedora 23,四步即可,等待时间比较长: sudo dnf update --refresh sudo dnf install dnf-plugin-system-upgrade sudo dnf system-upgrade download --releasever=23 sudo dnf system-upgrade reboot
3.Fedora 23再升级Fedora 25 1].更新key,升级,重新启动: $ sudo cp RPM-GPG-KEY-fedora-25-x86_64 RPM-GPG-KEY-fedora-x86_64 $ sudo dnf system-upgrade download --refresh --releasever=25 --allowerasing --setopt=keepcache=1 $ sudo dnf system-upgrade reboot 2].解决错误事务检查错误: Error: Transaction check error: file /usr/share/man/man1/vim.1.gz from install of vim-minimal-2:8.0.617-1.fc24.x86_64 conflicts with file from package vim-common-2:7.4.1868-1.fc22.x86_64 file /usr/lib64/gstreamer-1.0/libgstopus.so from install of gstreamer1-plugins-base-1.8.3-2.fc24.x86_64 conflicts with file from package gstreamer1-plugins-bad-free-1.6.4-1.fc23.x86_64 3].删除vim和gstreamer: $ sudo dnf remove vim # dnf remove gstreamer 4].解决conflicts with file from错误: # yum -y remove gstreamer1-plugins-bad-free-1.6.4-1.fc23.x86_64 5].继续下载更新所需库: $ sudo dnf system-upgrade download --refresh --releasever=25 --allowerasing --setopt=keepcache=1 6].启动更新: # dnf system-upgrade reboot 7].查看当前系统版本: $ uname -a Linux localhost.localdomain 4.13.16-100.fc25.x86_64 #1 SMP Mon Nov 27 19:52:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
4.Fedora 25再升级Fedora 27 经测试,支持跨版本更新哦。 $ uname -a Linux localhost.localdomain 4.15.15-300.fc27.x86_64 #1 SMP Mon Apr 2 23:14:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
5.Fedora 27升级到最终的目标版本:Fedora 28 请参考把Fedora 27升级到Fedora 28版本一文的步骤操作。
总结 要想把Fedora 21升级到Fedora 28得经历5个升级阶段,如果不是很必要,个人建议你重新安装Fedora 28,因为升级所花的时间也是很长的,可以参考在VMware Workstation虚拟机中安装Fedora 28操作系统一文。
相关主题 |