尝试在运行 Ubuntu 20.04.2 LTS 的 WSL2 上更新 ubuntu-minimal

尝试在运行 Ubuntu 20.04.2 LTS 的 WSL2 上更新 ubuntu-minimal

尝试更新时ubuntu-minimal出现以下错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up ubuntu-advantage-tools (27.2.1~20.04.1) ...
ERROR: File not found '/run/cloud-init/instance-data.json'. Provide a path to instance data json file using --instance-data
dpkg: error processing package ubuntu-advantage-tools (--configure):
 installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of ubuntu-minimal:
 ubuntu-minimal depends on ubuntu-advantage-tools; however:
  Package ubuntu-advantage-tools is not configured yet.

dpkg: error processing package ubuntu-minimal (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 ubuntu-advantage-tools
 ubuntu-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

我该如何解决这个问题?我在 WSL2 上运行 Ubuntu 20.04.2 LTS。

相关内容