- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个简单的 cloud-init 文件:
#cloud-config
package_upgrade: true
packages:
- symlinks
- wget
- rsync
- git
但我的 Azure 失败(最后提供日志)。
这是我第一次在 Azure 上使用 cloud-init。
可能出了什么问题以及如何修复它?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
$ uname -rm
5.10.0-6-cloud-amd64 x86_64
失败日志:
2021-05-28 14:44:26,704 - util.py[DEBUG]: Cloud-init v. 20.4.1 running 'modules:final' at Fri, 28 May 2021 14:44:26 +0000. Up 25.34 seconds.
2021-05-28 14:44:26,748 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.debian.Distro'>
2021-05-28 14:44:26,749 - stages.py[DEBUG]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) with frequency once-per-instance
2021-05-28 14:44:26,749 - handlers.py[DEBUG]: start: modules-final/config-package-update-upgrade-install: running config-package-update-upgrade-install with frequency once-per-instance
2021-05-28 14:44:26,756 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/1dd6dd52-1a5f-4a41-9810-da5e50583762/sem/config_package_update_upgrade_install - wb: [644] 24 bytes
2021-05-28 14:44:26,756 - helpers.py[DEBUG]: Running config-package-update-upgrade-install using lock (<FileLock using file '/var/lib/cloud/instances/1dd6dd52-1a5f-4a41-9810-da5e50583762/sem/config_package_update_upgrade_install'>)
2021-05-28 14:44:26,757 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/1dd6dd52-1a5f-4a41-9810-da5e50583762/sem/update_sources - wb: [644] 22 bytes
2021-05-28 14:44:26,757 - helpers.py[DEBUG]: Running update-sources using lock (<FileLock using file '/var/lib/cloud/instances/1dd6dd52-1a5f-4a41-9810-da5e50583762/sem/update_sources'>)
2021-05-28 14:44:26,757 - subp.py[DEBUG]: Running command ['apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--quiet', 'update'] with allowed return codes [0] (shell=False, capture=False)
2021-05-28 14:44:27,179 - util.py[DEBUG]: apt-update [apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet update] took 0.422 seconds
2021-05-28 14:44:27,180 - util.py[WARNING]: Package update failed
2021-05-28 14:44:27,180 - util.py[DEBUG]: Package update failed
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 86, in handle
cloud.distro.update_package_sources()
File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 205, in update_package_sources
self._runner.run("update-sources", self.package_command,
File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 185, in run
results = functor(*args)
File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 199, in package_command
util.log_time(logfunc=LOG.debug,
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2348, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 293, in subp
raise ProcessExecutionError(stdout=out, stderr=err,
cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
Command: ['apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--quiet', 'update']
Exit code: 100
Reason: -
Stdout: -
Stderr: -
2021-05-28 14:44:27,386 - subp.py[DEBUG]: Running command ['apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--quiet', 'dist-upgrade'] with allowed return codes [0] (shell=False, capture=False)
2021-05-28 14:44:27,464 - util.py[DEBUG]: apt-upgrade [apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet dist-upgrade] took 0.078 seconds
2021-05-28 14:44:27,465 - helpers.py[DEBUG]: update-sources already ran (freq=once-per-instance)
2021-05-28 14:44:27,465 - subp.py[DEBUG]: Running command ['apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--quiet', 'install', 'symlinks', 'wget', 'rsync', 'git'] with allowed return codes [0] (shell=False, capture=False)
2021-05-28 14:44:27,526 - util.py[DEBUG]: apt-install [apt-get --option=Dpkg::Options::=--force-confold --option=Dpkg::options::=--force-unsafe-io --assume-yes --quiet install symlinks wget rsync git] took 0.061 seconds
2021-05-28 14:44:27,526 - util.py[WARNING]: Failed to install packages: ['symlinks', 'wget', 'rsync', 'git']
2021-05-28 14:44:27,527 - util.py[DEBUG]: Failed to install packages: ['symlinks', 'wget', 'rsync', 'git']
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 100, in handle
cloud.distro.install_packages(pkglist)
File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 112, in install_packages
self.package_command('install', pkgs=pkglist)
File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 199, in package_command
util.log_time(logfunc=LOG.debug,
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2348, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 293, in subp
raise ProcessExecutionError(stdout=out, stderr=err,
cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
Command: ['apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--quiet', 'install', 'symlinks', 'wget', 'rsync', 'git']
Exit code: 100
Reason: -
Stdout: -
Stderr: -
2021-05-28 14:44:27,527 - cc_package_update_upgrade_install.py[WARNING]: 2 failed with exceptions, re-raising the last one
2021-05-28 14:44:27,527 - handlers.py[DEBUG]: finish: modules-final/config-package-update-upgrade-install: FAIL: running config-package-update-upgrade-install with frequency once-per-instance
2021-05-28 14:44:27,527 - util.py[WARNING]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) failed
2021-05-28 14:44:27,528 - util.py[DEBUG]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) failed
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 848, in _run_modules
ran, _r = cc.run(run_name, mod.handle, func_args,
File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 54, in run
return self._runners.run(name, functor, args, freq, clear_on_fail)
File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 185, in run
results = functor(*args)
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 124, in handle
raise errors[-1]
File "/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py", line 100, in handle
cloud.distro.install_packages(pkglist)
File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 112, in install_packages
self.package_command('install', pkgs=pkglist)
File "/usr/lib/python3/dist-packages/cloudinit/distros/debian.py", line 199, in package_command
util.log_time(logfunc=LOG.debug,
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2348, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 293, in subp
raise ProcessExecutionError(stdout=out, stderr=err,
cloudinit.subp.ProcessExecutionError: Unexpected error while running command.
Command: ['apt-get', '--option=Dpkg::Options::=--force-confold', '--option=Dpkg::options::=--force-unsafe-io', '--assume-yes', '--quiet', 'install', 'symlinks', 'wget', 'rsync', 'git']
Exit code: 100
Reason: -
Stdout: -
Stderr: -
最佳答案
较新版本的 apt 使用选项字符串,因此您可以延长超时并向命令添加重试。例如:
sudo apt update -o Dpkg::Lock::Timeout=60 -o Acquire::Retries=60
您可以将其包含在云配置文件中。 (示例 cloud-init 文件。)
apt:
conf: |
Acquire::Retries "60";
DPkg::Lock::Timeout "60";
这将创建一个文件/etc/apt/apt.conf.d/94cloud-init-config。这些选项有助于避免 waagent 竞争时立即出现锁定错误。
其他信息:
man apt.conf
ls/usr/share/doc/apt/examples/
关于linux - Azure 云初始化 : Failed to install packages,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67741343/
我正在尝试使用 JAXB 从 XSD 生成 java 类。 XSD 是我公司的官方 xsd,因此我无法仅为我的项目修改它们。在该网站上进行了数百次尝试和搜索后,我决定直接提出问题。 我的 XSD 中有
我已经了解了以下链接中的详细信息,但仍然存在何时使用哪个文件的问题?https://docs.npmjs.com/files/package-lock.json 最佳答案 包.json 包含项目的相关
当我在 centos 上运行命令 rpmbuild -bb mypackage.spec 时,出现错误 error: Package already exists: %package debuginf
my.packages 是 src 目录中的自定义原型(prototype)包。 Plone 实例中的数千个项目与其类型一起添加。我想将包重命名为 my.package。通过简单地卸载 my.pack
根据 javadoc 规范,我在相关包的根目录中放置了一个名为 package-info.html 的文档文件。但是,当我在该文件夹上运行 Doxygen 时,不会拾取该文件中的文档。我如何告诉 Do
我已经定义了如下的包: (defpackage :thehilariouspackageofamirteymuri (:nicknames ampack amir teymuri) (:use
我正在思考这个问题: > .packages() > (.packages()) [1] "stats" "graphics" "grDevices" "utils" "datase
我在内存中有一个 System.IO.Packaging.Package(它是一个 WordprocessingDocument)并且想将它流式传输到浏览器以保存它。 Word 文档已被基于 MVC
即使这是我不常发现的东西,在成员之前注释/* package*/的原因是什么? /* package */ final void attach(Context context) { atta
我正在开发我的应用程序,但在添加包以便导入它时,我总是收到此错误。 error: type 'Package.Dependency' has no member 'Package' 这是我的 Pack
install.packages("data.table") trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.
放置手动创建的插件的最佳位置是什么: a) C:\Users\{UserName}\AppData\Roaming\Sublime Text 3\Packages 或 b) C:\Users\{Use
这是一个有趣的 Perl 行为。 (至少对我来说 :) ) 我有两个包 PACKAGE1 和 PACKAGE2,它们导出具有相同名称的函数 Method1()。 由于将有如此多的包将导出相同的功能,使
package-archives (("marmalade" . "http://marmalade-repo.org/packages/") ("gnu" . "http://elpa.gnu.or
任何人都可以让我知道 package-lock.json 文件的确切用途吗? 尽管许多人提到它用于查看版本化依赖树。 寻找简单易行的解释。 提前致谢。 最佳答案 npm install使用此文件来确保
Python documentation说 Consider this code: import sound.effects.echo import sound.effects.surround fr
我在 ubuntu 上运行 VPS: Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 C
我有这样一个结构 $ tree -h . ├── [1.0K] myproj │ ├── [ 0] index.py │ ├── [ 0] __init__.py │ └──
我正在尝试解压 System.IO.Packaging.Package我从网络服务器收到的。也就是说,我正在使用 System.IO.Packaging.Package.Open(Stream)方法并
关于 package.json 文件中的@types 依赖项,我有一个愚蠢的问题: 在下面的 URL 中解释了应该安装的类型作为运行时依赖 npm install --save @types/loda
我是一名优秀的程序员,十分优秀!