错误:FileNotFoundError,而“do-release-upgrade”没有这样的文件或目录:'/tmp/ubuntu-release-upgrader-frfzvq3x/Ubuntu.info'

错误:FileNotFoundError,而“do-release-upgrade”没有这样的文件或目录:'/tmp/ubuntu-release-upgrader-frfzvq3x/Ubuntu.info'

我正在尝试从 Ubuntu 20.04.5 LTS 升级到 Ubuntu 22.04.1 LTS,但在执行发布升级时出现了如下错误

**FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ubuntu-release-upgrader-frfzvq3x/Ubuntu.info'**

**
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]                                                                    
Get:2 Upgrade tool [1,267 kB]                                                                           
Fetched 1,267 kB in 0s (0 B/s)                                                                          
authenticate 'jammy.tar.gz' against 'jammy.tar.gz.gpg' 
extracting 'jammy.tar.gz'

Reading cache

**Checking package manager
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit **http://archive.ubuntu.com/ubuntu** focal InRelease                                                    
Get:1 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                                 
Get:2 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]                                
Get:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]                               
Get:4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [275 kB]                
Get:5 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [408 kB]            
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]           
Get:7 http://archive.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [59.9 kB]                                  
Fetched 1,213 kB in 0s (0 B/s)                                                                          
Reading package lists... Done    
Building dependency tree          
Reading state information... Done
None

Checking for installed snaps

Calculating snap size requirements

Updating repository information

Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-frfzvq3x/jammy", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-frfzvq3x/DistUpgrade/DistUpgradeMain.py", line 241, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-frfzvq3x/DistUpgrade/DistUpgradeController.py", line 2042, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-frfzvq3x/DistUpgrade/DistUpgradeController.py", line 1880, in fullUpgrade
    if not self.updateSourcesList():
  File "/tmp/ubuntu-release-upgrader-frfzvq3x/DistUpgrade/DistUpgradeController.py", line 783, in updateSourcesList
    self.sources = SourcesList(matcherPath=self.datadir)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ubuntu-release-upgrader-frfzvq3x/Ubuntu.info'**

这是 do-release-upgrade 的所有输出。

答案1

这个过程有效(tl;dr run sudo do-release-upgrade,在使用 Cz 启动后暂停/后台运行该进程,将 Ubuntu.info 触摸到由 do-release-upgrade 命令创建的临时文件夹中,然后通过运行 fg(前台)继续) ubuntu - 无法更新至 20.10 - Unix & Linux Stack Exchange

相关内容