如何解决运行“do-release-upgrade”时出现“权限被拒绝”错误?

如何解决运行“do-release-upgrade”时出现“权限被拒绝”错误?

我正在尝试将 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 的评论

相关内容