当我尝试从 12.04 升级到 12.10 时它甚至无法启动。
do release-upgrade
以下是和 cat /var/log/dist-upgrade/main.log
(apt.log
不存在)的终端输出。
root@somehost:/tmp# do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1198 kB]
Fetched 1198 kB in 0s (0 B/s)
authenticate 'quantal.tar.gz' against 'quantal.tar.gz.gpg'
extracting 'quantal.tar.gz'
Reading cache
Checking package manager
Continue running under SSH?
This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.
If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?
Continue [yN] y
A fatal error occurred
Please report this as a bug and include the files
/var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
your report. The upgrade has aborted.
Your original sources.list was saved in
/etc/apt/sources.list.distUpgrade.
Traceback (most recent call last):
File "/tmp/update-manager-l6hrMz/quantal", line 10, in <module>
sys.exit(main())
File "/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeMain.py",
line 240, in main
if app.run():
File
"/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeController.py",
line 1764, in run
return self.fullUpgrade()
File
"/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeController.py",
line 1616, in fullUpgrade
if not self.prepare():
File
"/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeController.py",
line 429, in prepare
self._sshMagic()
File
"/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeController.py",
line 299, in _sshMagic
"Do you want to continue?") % port)
File "/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeViewText.py",
line 216, in askYesNoQuestion
res = sys.stdin.readline().decode(ENCODING, "backslashreplace")
TypeError: decode() argument 1 must be string, not None
=== Command detached from window (Sun Feb 17 22:29:59 2013) ===
=== Command terminated with exit status 1 (Sun Feb 17 22:29:59 2013) ===
root@somehost:/tmp# cat /var/log/dist-upgrade/main.log
2013-02-17 22:29:55,763 INFO Using config files '['./DistUpgrade.cfg']'
2013-02-17 22:29:55,763 INFO uname information: 'Linux somehost 3.2.0-37-generic #58-Ubuntu SMP Thu Jan 24 15:28:10 UTC 2013 x86_64'
2013-02-17 22:29:55,763 INFO apt version: '0.8.16~exp12ubuntu10.7'
2013-02-17 22:29:55,764 INFO release-upgrader version '0.190.4' started
2013-02-17 22:29:55,883 DEBUG Using 'DistUpgradeViewText' view
2013-02-17 22:29:55,915 DEBUG aufsOptionsAndEnvironmentSetup()
2013-02-17 22:29:55,915 DEBUG using '/tmp/upgrade-rw-3rOa1K' as aufs_rw_dir
2013-02-17 22:29:55,916 DEBUG using '/tmp/upgrade-chroot-CDOxkq' as aufs chroot dir
2013-02-17 22:29:55,916 DEBUG enable dpkg --force-overwrite
2013-02-17 22:29:55,926 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2013-02-17 22:29:58,326 DEBUG lsb-release: 'precise'
2013-02-17 22:29:59,924 ERROR not handled exception:
Traceback (most recent call last):
File "/tmp/update-manager-l6hrMz/quantal", line 10, in <module>
sys.exit(main())
File "/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeMain.py", line 240, in main
if app.run():
File "/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeController.py", line 1764, in run
return self.fullUpgrade()
File "/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeController.py", line 1616, in fullUpgrade
if not self.prepare():
File "/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeController.py", line 429, in prepare
self._sshMagic()
File "/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeController.py", line 299, in _sshMagic
"Do you want to continue?") % port)
File "/tmp/update-manager-l6hrMz/DistUpgrade/DistUpgradeViewText.py", line 216, in askYesNoQuestion
res = sys.stdin.readline().decode(ENCODING, "backslashreplace")
TypeError: decode() argument 1 must be string, not None
2013-02-17 22:29:59,925 DEBUG enabling apt cron job
答案1
确保您已正确设置区域设置 -
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
然后,将以下内容添加到 /etc/bash.bashrc:
export LANG='en_US.UTF-8'
export SUPPORTED="$LANG:en_US:en"
您应该修改变量以匹配您首选的语言环境。您需要重新登录(或者,如果是 SSH,则重新连接)才能使更改生效。如果您使用的是 byobu、tmux 或 screen,请务必先退出每个窗口并关闭会话。