请帮我一下,我几乎不懂,而且是 Ubuntu 的新用户。我正尝试使用以下方法从 14.04.4 LTS 升级到 16.04.3 LTS
do-release-upgrade
但它失败了,我收到了错误信息
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-i_2c0bda/xenial", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-i_2c0bda/DistUpgrade/DistUpgradeMain.py", line 239, in main
save_system_state(logdir)
File "/tmp/ubuntu-release-upgrader-i_2c0bda/DistUpgrade/DistUpgradeMain.py", line 131, in save_system_state
scrub_sources=True)
File "/tmp/ubuntu-release-upgrader-i_2c0bda/DistUpgrade/apt_clone.py", line 149, in save_state
self._write_state_installed_pkgs(sourcedir, tar)
File "/tmp/ubuntu-release-upgrader-i_2c0bda/DistUpgrade/apt_clone.py", line 203, in _write_state_installed_pkgs
import lsb_release
ImportError: No module named 'lsb_release'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/problem_report.py", line 416, in add_to_existing
self.write(f)
File "/usr/lib/python3/dist-packages/problem_report.py", line 369, in write
block = f.read(1048576)
File "/usr/lib/python3.4/codecs.py", line 319, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
Original exception was:
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-i_2c0bda/xenial", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-i_2c0bda/DistUpgrade/DistUpgradeMain.py", line 239, in main
save_system_state(logdir)
File "/tmp/ubuntu-release-upgrader-i_2c0bda/DistUpgrade/DistUpgradeMain.py", line 131, in save_system_state
scrub_sources=True)
File "/tmp/ubuntu-release-upgrader-i_2c0bda/DistUpgrade/apt_clone.py", line 149, in save_state
self._write_state_installed_pkgs(sourcedir, tar)
File "/tmp/ubuntu-release-upgrader-i_2c0bda/DistUpgrade/apt_clone.py", line 203, in _write_state_installed_pkgs
import lsb_release
ImportError: No module named 'lsb_release'
=== Command detached from window (Thu Nov 9 11:20:21 2017) ===
我应该怎么做才能成功完成升级?
先谢谢了。
答案1
我确实搜索过lsb_release在我的 Ubuntu 16.04.3 LTS 上安装了该模块dpkg -S lsb_release | grep python
并获取了它的软件包(lsb-release
)。在 Trusty 中它位于同一个包。
所以对我来说似乎你应该在升级之前安装这个包
sudo apt-get install lsb-release
。