我是 Linux 新手。我最近订购了第一个运行 Ubuntu 10.04 的(非托管)VPS。我成功地通过 SSH 连接(PuTTY)升级到 12.04,但现在升级到 12.10 版本时遇到了一些问题。这正是我所做的:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo reboot
sudo do-release-upgrade -c
Checking for a new Ubuntu release.
New release '12.10' available.
Run 'do-release-upgrade' to upgrade to it.
sudo do-release-upgrade
几秒钟后,由于未找到“/var/run/utmp”,安装过程停止:
root@vm3593:~# sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1200 kB]
Fetched 1200 kB in 0s (0 B/s)
authenticate 'quantal.tar.gz' against 'quantal.tar.gz.gpg'
extracting 'quantal.tar.gz'
/var/run/utmp: No such file or directory
所以我尝试了:
cd /
sudo cat /dev/null > /var/run/utmp
sudo reboot
并且它修复了丢失文件的问题(耶!)。
不幸的是,安装仍然遇到以下错误:
File
"/tmp/update-manager-ZdDbE2/DistUpgrade/DistUpgradeController.py",
line 1616, in fullUpgrade
if not self.prepare():
File
"/tmp/update-manager-ZdDbE2/DistUpgrade/DistUpgradeController.py",
line 429, in prepare
self._sshMagic()
File
"/tmp/update-manager-ZdDbE2/DistUpgrade/DistUpgradeController.py",
line 299, in _sshMagic
"Do you want to continue?") % port)
File "/tmp/update-manager-ZdDbE2/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 (Sat Aug 3 20:26:10 2013) ===
=== Command terminated with exit status 1 (Sat Aug 3 20:26:10 2013) ===
我能做些什么?
请记住,我对此完全陌生。
答案1
引用自帖子:
现在升级...(耶!)尝试:
sudo LC_ALL=C.UTF-8 sudo do-release-upgrade
或者
export LC_ALL=C.UTF-8 sudo do-release-upgrade
前者为我做到了。
我将其作为答案发布,直到用户创建自己的答案并将其标记为答案。