Knighthana
文章95
标签138
分类7

文章归档

Ubuntu的advantage tools失败

Ubuntu的advantage tools失败

ERROR: File not found '/run/cloud-init/instance-data.json'. Provide a path to instance data json file using --instance-data

症状:

使用apt期间,在执行至Setting up ubuntu-advantage-tools

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

Errors were encountered while processing:

ubuntu-advantage-tools

E: Sub-process /usr/bin/dpkg returned an error code (1)

解决方案:

先执行一遍

1
sudo cloud-init init

参考:

ubuntu-advantage-tools package in Ubuntu

cloud-init-The-cross-cloud-Magic-Sauce-Scott-Moser-Chad-Smith-Canonical.pdf

Instance Metadata

capabilities

其他:

aptdpkg是系统中至关重要的包管理软件,无法理解为什么允许有这种莫名其妙的错误发生。

这个莫名其妙的新软件包"ubuntu-advantage-tools"因为找不到某个与另一程序"cloud-init"有关的文件就卡住了,然后dpkg也不管不问因此卡住仅仅return了一个1,进而所有的apt指令都失去效果,整个系统差点就不能用了。

查询发现cloud-init并不是什么对于操作系统运行至关重要的东西。

这套包管理系统简直是脆弱。

2021-07-24