舊的Ubuntu 16.04 LTS要用do-release-upgrade指令將系統升級到18.04 LTS的時候,出現看起來就是locale字集的設定錯誤:
Traceback (most recent call last):
File "/usr/bin/do-release-upgrade", line 123, in <module>
print(_("Checking for a new Ubuntu release"))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)
參考了Error upgrading to 13.04, "'ascii' codec can't encode character "一文後,依序用下列的指令就可以順利將Ubuntu從16.04升級到18.04惹:
- sudo apt update -y && sudo apt upgrade -y
- sudo reboot,等重開機後再做下面的指令
- sudo ufw allow 1022/tcp
- LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8
- sudo do-release-upgrade
參考資料
- Ubuntu 16.04用ESM做安全性更新:在更新套件出問題可參考這篇
- How to upgrade Ubuntu 16.04 to 18.04 LTS using CLI:升級主要看這篇
- locale@Ubuntu 18.04探索筆記:設定英文介面
_EOF_
沒有留言:
張貼留言