Сб. работал над обычным apt update && apt upgrade
и обнаружил некоторую проблему с ubuntu-advance-tools
.
Я не уверен, для чего предназначен этот пакет, но он входил в состав Ubuntu 20.04.2 LTS (GNU / Linux 5.4.72-microsoft-standard-WSL2 x86_64).
Я попробовал обычную apt purge
и попытался установить снова, но все равно ничего не вышло.
$ sudo apt install ubuntu-minimal
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
ubuntu-advantage-tools
The following NEW packages will be installed:
ubuntu-advantage-tools ubuntu-minimal
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/847 kB of archives.
After this operation, 3233 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package ubuntu-advantage-tools.
(Reading database ... 58786 files and directories currently installed.)
Preparing to unpack .../ubuntu-advantage-tools_27.2.1~20.04.1_amd64.deb ...
Unpacking ubuntu-advantage-tools (27.2.1~20.04.1) ...
Selecting previously unselected package ubuntu-minimal.
Preparing to unpack .../ubuntu-minimal_1.450.2_amd64.deb ...
Unpacking ubuntu-minimal (1.450.2) ...
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
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
ubuntu-advantage-tools
ubuntu-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)
Я просто показываю пример установки ubuntu-minimal
, потому что это (я думаю) единственное, что зависит от ubuntu-advance-tools
, и удаление ubuntu- Преимущество-инструменты
также удалили ubuntu-minimal
.
Я могу воссоздать мою Ubuntu WSL, но это своего рода PITA. Я не получаю коммерческую поддержку от Canonical, мне нужно беспокоиться о том, что этот пакет не работает? Больше беспокоило то, что метапакет ubuntu-minimal
сломан.
Спасибо!
Я закончил "сбросом" моей установки WSL Ubuntu, сделал начальное "apt update && apt full-upgrade -y && apt autoremove -y", и ошибка вернулась. Может быть, у Ubuntu прямо сейчас есть пакет с ошибками?
[... bunch of other apt output here ...]
Setting up ubuntu-advantage-tools (27.2.1~20.04.1) ...
Installing new version of config file /etc/ubuntu-advantage/uaclient.conf ...
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
[... bunch of other apt output here ...]
Errors were encountered while processing:
ubuntu-advantage-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Обновление ubuntu-преимущества-инструменты не удалось настроить Ошибка №1938097
sudo su in the terminal
(nano, gedit .......) /var/lib/dpkg/info/ubuntu-advantage-tools.postinst
line 295: cloud_id=$(cloud-id || true)
making this change and then run dpkg --configure -a
Альтернативный обходной путь - удаление пакета cloud-init. Если этот пакет не установлен, cloud-init не может быть найден, поэтому ошибки не возникает.