我想升級我的系統。所以我做了一個:
sudo do-release-upgrade
但我有一個重大錯誤:
Upgrading Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-qgoff5d4/xenial", line 8, in
File "/tmp/ubuntu-release-upgrader-qgoff5d4/DistUpgrade/DistUpgradeMain.py", line 242, in main
File "/tmp/ubuntu-release-upgrader-qgoff5d4/DistUpgrade/DistUpgradeController.py", line 1876, in run
File "/tmp/ubuntu-release-upgrader-qgoff5d4/DistUpgrade/DistUpgradeController.py", line 1841, in fullUpgrade
File "/tmp/ubuntu-release-upgrader-qgoff5d4/DistUpgrade/DistUpgradeController.py", line 1257, in doDistUpgrade
UnboundLocalError: local variable 'e' referenced before assignment
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 109, in apport_excepthook
pr.add_proc_info(extraenv=['PYTHONPATH', 'PYTHONHOME'])
File "/usr/lib/python3/dist-packages/apport/report.py", line 532, in add_proc_info
self['ExecutableTimestamp'] = str(int(os.stat(self['ExecutablePath']).st_mtime))
PermissionError: [Errno 13] Permission denied: '/tmp/ubuntu-release-upgrader-qgoff5d4/xenial'
Original exception was:
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-qgoff5d4/xenial", line 8, in
File "/tmp/ubuntu-release-upgrader-qgoff5d4/DistUpgrade/DistUpgradeMain.py", line 242, in main
File "/tmp/ubuntu-release-upgrader-qgoff5d4/DistUpgrade/DistUpgradeController.py", line 1876, in run
File "/tmp/ubuntu-release-upgrader-qgoff5d4/DistUpgrade/DistUpgradeController.py", line 1841, in fullUpgrade
File "/tmp/ubuntu-release-upgrader-qgoff5d4/DistUpgrade/DistUpgradeController.py", line 1257, in doDistUpgrade
UnboundLocalError: local variable 'e' referenced before assignment
我到處尋找但找不到解決方案。如果有人可以提供協助,將不勝感激。
答案1
你可以試試須藤apt安裝-f但除此之外,最好先進行全新安裝。線上升級可能不適用於已安裝且處於活動狀態的專有顯示卡驅動程式。
答案2
嘗試這個:
第一:您需要更新系統。
打開終端,
按Ctrl+ Alt+T
運行:
exec sudo -i
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get clean
重新啟動系統以完成安裝更新,並將 upstart 變更為 systemd:
打開終端,
按Ctrl+ Alt+T
運行:
exec sudo -i
add-apt-repository ppa:pitti/systemd
apt-get update
apt-get install systemd libpam-systemd systemd-ui
apt-get dist-upgrade
cp /etc/default/grub /etc/default/grub.bak
nano /etc/default/grub
在開啟的文件中保留這一行:
GRUB_CMDLINE_LINUX_DEFAULT = "init=/lib/systemd/systemd"
繼續運行:
update-grub
ln -fs /proc/self/mounts /etc/mtab
重新啟動您的系統,
如果出現任何問題,若要撤銷更改,請執行:
exec sudo -i
mv /etc/default/grub.bak /etc/default/grub
update-grub
如果一切順利,並升級到新的可用版本:
打開終端,
按Ctrl+ Alt+T
運行:
exec sudo -i
update-manager -d
軟體更新程式將顯示並蒐索新版本,幾秒鐘後,您將看到以下畫面:
不過,Ubuntu 16.04 現已推出。
按下升級按鈕開始升級到 Ubuntu 16.04。
軟體更新程式將要求您確認是否仍要升級,並按「開始升級」開始安裝 Ubuntu 16.04。
現在,軟體更新程式將準備開始設定新的軟體通道,幾分鐘後,軟體更新程式將通知您詳細信息,將要刪除的軟體包數量以及將要安裝的軟體包數量,請按開始升級以繼續。
結束 dist-upgrade,重新啟動系統並:
打開終端,
按Ctrl+ Alt+T
運行:
exec sudo -i
dpkg --configure -a
apt-get -f install
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get clean