Debian 各稳定版之间存在相当的差异,升级前应仔细阅读发布说明。
In this section, we will focus on upgrading a Jessie system to Stretch. This is a major operation on a system; as such, it is never 100% risk-free, and should not be attempted before all important data has been backed up.
减少安装的软件包,只安装绝对必要的软件包,才能让升级容易 (且简短)。相关的工具包括
aptitude
、
deborphan
与
debfoster
(见
第 6.2.7 节 “自动追踪已安装的软件包”)。例如,您可使用以下命令,再使用
aptitude
的交互模式再检查并微调该移除的软件包:
# deborphan | xargs aptitude --schedule-only remove
Now for the upgrading itself. First, you need to change the /etc/apt/sources.list
file to tell APT to get its packages from Stretch instead of Jessie. If the file only contains references to Stable rather than explicit codenames, the change isn't even required, since Stable always refers to the latest released version of Debian. In both cases, the database of available packages must be refreshed (with the apt update
command or the refresh button in synaptic
).
注册这些添加的软件包来源后,首先运行最低量的升级 apt upgrade
。以两阶段升级,减缓软件包管理工具的工作并确保使用最新的软件包,纳入完整发行版升级所需的错误更正与改进。
Once this first upgrade is done, it is time to handle the upgrade itself, either with apt full-upgrade
, aptitude
, or synaptic
. You should carefully check the suggested actions before applying them: you might want to add suggested packages or deselect packages which are only recommended and known not to be useful. In any case, the front-end should come up with a scenario ending in a coherent and up-to-date Stretch system. Then, all you need is to do is wait while the required packages are downloaded, answer the Debconf questions and possibly those about locally modified configuration files, and sit back while APT does its magic.
仅管 Debian 管理者已经尽力做好份内的工作,主系统的升级仍可能卡卡的不如想像中顺利。软件的新版本可能无法与旧的兼容 (例如,可能改变缺省行为或数据格式)。同时,尽管在 Debian 发布前做为详尽的测试,还是有若干漏网的错误。
可以先安装 apt-listchanges package, 软件包,在软件包升级前先显示可能问题。由软件包维护者编辑的这些信息且置于 /usr/share/doc/软件包名/NEWS.Debian
文件名内,供用户参考。阅读该等文件 (可能经由 apt-listchanges) 应有助于归避不好的意外。
新版的软件不见得都能顺利运作。不够普及或未经详实测试就会出现这种现象;在稳定版里,最后升级的软件常常后悔。碰到这种情形,首先应查看错误追踪系统 https://bugs.debian.org/软件包名称
,寻找别人提报的踪迹。若尚未被提报,就应动手提报它 reportbug
。若已被提报,错误报告与相关的消息就是处理该错误很好的信息来源:
很严重的错误,将有特别的软件包供稳定版使用。在这种情况下,修订后的软件包位于 Debian 镜射站的
proposed-updates
区块 (见
第 6.1.2.3 节 “计划更新”)。对应的条目暂时加在
sources.list
文件内,可用
apt
或
aptitude
命令安装升级软件包。
修订软件包尚未被稳定版管理者认可时,就不会出现在此区块。用户必须自己动手认可它。虽然列在此的软件包尚未可得,但至少已知在审查中。