我有一台运行旧版本的计算机Ubuntu 8.04 LTS
。
以及8.04
,下一个 LTS 版本10.04
也不再受支持。
目前没有公布从 直接升级的途径8.04 -> 12.04
。
出版了路径来自8.04 -> 10.04
从而路径来自10.04 -> 12.04
如果我尝试标准常规升级指令,我会收到 Python 错误。Ubuntu 8.04
附带Python 2.5
。在此错误消息中,“Precise”是 的昵称Ubuntu 12.04
。
stewart@old-ubuntu-box:~$ sudo do-release-upgrade
Checking for a new ubuntu release
Done Upgrade tool signature
Done Upgrade tool
Done downloading
authenticate 'precise.tar.gz' against 'precise.tar.gz.gpg'
extracting 'precise.tar.gz'
/tmp/tmpwfCGnZ/DistUpgradeMain.py:102: Warning: 'with' will become a reserved keyword in Python 2.6
Traceback (most recent call last):
File "/tmp/tmpwfCGnZ/precise", line 3, in <module>
from DistUpgradeMain import main
File "/tmp/tmpwfCGnZ/DistUpgradeMain.py", line 102
with open(fname, "a"):
^
SyntaxError: invalid syntax
如果我尝试将 Python 升级到2.6
或2.7
,以支持升级的运行,我会发现依赖问题,因为我仍然只使用8.04
。
stewart@old-ubuntu-box:~$ sudo apt-get install python2.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
python2.6: Depends: python2.6-minimal (= 2.6.5-1ubuntu7~lts1) but it is not going to be installed
Depends: libc6 (>= 2.11) but 2.7-10ubuntu8.3 is to be installed
Depends: libdb4.8 but it is not installable
Depends: libreadline6 (>= 6.0) but it is not installable
Depends: libsqlite3-0 (>= 3.6.22) but 3.4.2-2 is to be installed
E: Broken packages
这是一个循环的两难境地。理想情况下,我应该能够安装这些损坏的依赖项(libc6
等)的正确版本,但对于如何针对不受支持的版本执行此操作却一直难以捉摸。
关于如何逃避/解决这个问题,有什么建议吗?
更新:
我已经按照make install
说明升级了 Python找到这里但是,上面的 Python 错误do-release-upgrade
是相同的。
答案1
您可以尝试使用apt-get dist-upgrade
。在此之前,编辑
/etc/apt/sources.list:
deb http://archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://archive.ubuntu.com/ubuntu/ lucid main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted
然后sudo apt-get update
和sudo apt-get dist-upgrade
。如果成功,则重新启动,希望do-release-upgrade
现在可以从 10.04 -> 12.04 运行。
这可能不是推荐的做法。我没有找到如何做到do-release-upgrade
这一点的方法。
如果升级过程因某种原因中断,命令
dpkg --configure --pending
apt-get install -f
可能会有用。
答案2
如果可能的话,我建议你尝试使用https://help.ubuntu.com/community/LucidUpgrades#Upgrading_Using_the_Alternate_CD.2FDVD
遇到了这个问题后,我按照以下说明成功地从 8.04 升级到了 10.04:我刻录了一张 CD,上面有http://old-releases.ubuntu.com/releases/lucid/ubuntu-10.04.4-alternate-amd64.iso,使用 进行安装sudo mount /dev/sr0 /cdrom
(您的设备名称可能不同!),然后使用 运行升级sudo sh /cdrom/cdromupgrade
。此操作已成功完成。如果您只是按照给出的说明使用环回设备安装映像,此操作也应该有效。