在运行 Ubuntu 14.04 的 BeagleBone Black 上,do-release-upgrade 失败,出现编码错误

在运行 Ubuntu 14.04 的 BeagleBone Black 上,do-release-upgrade 失败,出现编码错误
# do-release-upgrade

Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]                                           
Get:2 Upgrade tool [1230 kB]                                                   
Fetched 1230 kB in 0s (0 B/s)                                                  
authenticate 'wily.tar.gz' against 'wily.tar.gz.gpg' 
extracting 'wily.tar.gz'

Zwischenspeicher wird gelesen



Ein schwerwiegender Fehler ist aufgetreten 

Error in sys.excepthook:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-d3h4k3i1/DistUpgrade/DistUpgradeViewText.py", line 142, in _handleException
"\n".join(lines))
  File "/tmp/ubuntu-release-upgrader-d3h4k3i1/DistUpgrade/DistUpgradeViewText.py", line 177, in error
print(twrap(msg))
UnicodeEncodeError: 'ascii' codec can't encode character '\xfc' in position 45: ordinal not in range(128)

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-d3h4k3i1/wily", line 8, in <module>
sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-d3h4k3i1/DistUpgrade/DistUpgradeMain.py", line 240, in main
if app.run():
  File "/tmp/ubuntu-release-upgrader-d3h4k3i1/DistUpgrade/DistUpgradeController.py", line 1837, in run
return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-d3h4k3i1/DistUpgrade/DistUpgradeController.py", line 1652, in fullUpgrade
self._view.updateStatus(_("Checking package manager"))
  File "/tmp/ubuntu-release-upgrader-d3h4k3i1/DistUpgrade/DistUpgradeViewText.py", line 156, in updateStatus
print(msg)
UnicodeEncodeError: 'ascii' codec can't encode character '\xfc' in position 21: ordinal not in range(128)

如果 LANG 设置为 de_DE.UTF-8,就会发生这种情况。

如果在升级之前设置了 export LANG=en,则不会发生这种情况。

为什么会发生这种情况?

相关内容