![如何解决运行“do-release-upgrade”时出现“权限被拒绝”错误?](https://linux22.com/image/950947/%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E8%BF%90%E8%A1%8C%E2%80%9Cdo-release-upgrade%E2%80%9D%E6%97%B6%E5%87%BA%E7%8E%B0%E2%80%9C%E6%9D%83%E9%99%90%E8%A2%AB%E6%8B%92%E7%BB%9D%E2%80%9D%E9%94%99%E8%AF%AF%EF%BC%9F.png)
我正在尝试将 Ubuntu 18.04 升级到 20.04。sudo apt update && sudo apt upgrade
返回 0 已升级。sudo do-release-upgrade
返回以下日志:
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1554 B]
Get:2 Upgrade tool [1337 kB]
Fetched 1339 kB in 0s (0 B/s)
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'
extracting 'focal.tar.gz'
mkdir: cannot create directory '/run/user/0': Permission denied
[26749:0126/190654.793003:FATAL:atom_main_delegate.cc(210)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-dzkq9w82/focal", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-dzkq9w82/DistUpgrade/DistUpgradeMain.py", line 222, in main
run_new_gnu_screen_window_or_reattach()
File "/tmp/ubuntu-release-upgrader-dzkq9w82/DistUpgrade/DistUpgradeMain.py", line 196, in run_new_gnu_screen_window_or_reattach
os.execv("/usr/bin/screen", cmd)
FileNotFoundError: [Errno 2] No such file or directory
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/problem_report.py", line 497, in add_to_existing
self.write(f)
File "/usr/lib/python3/dist-packages/problem_report.py", line 452, in write
crc = zlib.crc32(block, crc)
TypeError: a bytes-like object is required, not 'str'
Original exception was:
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-dzkq9w82/focal", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-dzkq9w82/DistUpgrade/DistUpgradeMain.py", line 222, in main
run_new_gnu_screen_window_or_reattach()
File "/tmp/ubuntu-release-upgrader-dzkq9w82/DistUpgrade/DistUpgradeMain.py", line 196, in run_new_gnu_screen_window_or_reattach
os.execv("/usr/bin/screen", cmd)
FileNotFoundError: [Errno 2] No such file or directory
如何解决这个问题?如果您需要更多信息,请告诉我。
答案1
我删除了
screen
由 安装的snap
,并用 安装了它apt
。这解决了问题。谢谢!
来自的回答OP 的评论