- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
现在我的 Vagrantfile 中有以下内容:
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "apt"
chef.add_recipe "build-essential"
chef.add_recipe "chef-redis::source"
chef.add_recipe "openssl"
chef.add_recipe "git"
chef.add_recipe "postgresql::server"
chef.add_recipe "postgresql::client"
end
为了安装添加到我的recipe_list中的软件,我需要让虚拟机在安装其他软件之前发出apt-get更新。
我的印象是,这是“apt”配方的功能之一 - 它会首先运行更新。
当我执行 Vagrant 规定时的输出是:
[Sat, 11 Feb 2012 22:20:03 -0800] INFO: *** Chef 0.10.2 ***
[Sat, 11 Feb 2012 22:20:03 -0800] INFO: Setting the run_list to ["recipe[apt]", "recipe[build-essential]", "recipe[chef-redis::source]", "recipe[openssl]", "recipe[git]", "recipe[postgresql::server]", "recipe[postgresql::client]", "recipe[vagrant-main]"] from JSON
[Sat, 11 Feb 2012 22:20:03 -0800] INFO: Run List is [recipe[apt], recipe[build-essential], recipe[chef-redis::source], recipe[openssl], recipe[git], recipe[postgresql::server], recipe[postgresql::client], recipe[vagrant-main]]
[Sat, 11 Feb 2012 22:20:03 -0800] INFO: Run List expands to [apt, build-essential, chef-redis::source, openssl, git, postgresql::server, postgresql::client, vagrant-main]
[Sat, 11 Feb 2012 22:20:03 -0800] INFO: Starting Chef Run for lucid32
[Sat, 11 Feb 2012 22:20:03 -0800] INFO: Processing package[postgresql-client] action install (postgresql::client line 37)
[Sat, 11 Feb 2012 22:20:04 -0800] ERROR: package[postgresql-client] (postgresql::client line 37) has had an error
[Sat, 11 Feb 2012 22:20:04 -0800] ERROR: Running exception handlers
[Sat, 11 Feb 2012 22:20:04 -0800] ERROR: Exception handlers complete
[Sat, 11 Feb 2012 22:20:04 -0800] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[Sat, 11 Feb 2012 22:20:04 -0800] FATAL: Chef::Exceptions::Exec: package[postgresql-client] (postgresql::client line 37) had an error: apt-get -q -y install postgresql-client=8.4.8-0ubuntu0.10.04 returned 100, expected 0
最佳答案
您可以在开头包含 apt 配方:
include_recipe 'apt'
这将运行更新命令。
关于apt - 如何让 Chef 在运行其他 Recipe 之前运行 apt-get update,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9246786/
我一直在尝试让 yum 在代理设置后面工作 导出 https_proxy、http_proxy 和 ftp_proxy。 这对 apt-get 或 yum 不起作用,但当我在 /etc/apt/apt
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
为什么基于 Debian 的 Linux 发行版具有apt以及apt-get?apt是替换还是他们apt-get 有不同的目的?我们解释这两个命令之间的关系。 Debian 软件包管理系统 创建Lin
例如,当安装 lirc 包时,它会提供配置对话框屏幕。如何自动化以选择默认值(或可能提供特定值)并继续? 现在我有一个简单的脚本: #!/usr/bin/env python import a
我有一个 APT 处理器,在某些情况下会显示警告。我的项目正在使用 maven1 构建调用 ant:apt 如何让maven在满足警告条件时失败? (处理器可以修改) 谢谢。 最佳答案 注释处理器需要
我在 Windows 上使用 WSL。我无法使用 apt 或 apt-get 这是我在尝试使用 apt 或 apt-get 时收到的错误消息。 ~$ apt apt: error while load
我正在寻找一些命令行说明。我应该有带有 Python 2.7 的 Ubuntu Linux Server(为什么不能简单解释如何在你的 ULS 上获取 Python 2.7!)。 (编辑——显然 Py
当我尝试构建一个简单的docker映像时:。在Dockerfile中:。输出为:。我试过:。我之前构建了多个docker映像,一切都运行得很好。而现在,我总是会突然发现这个错误。
在 bash 脚本中,我想安装一个包。在理智地这样做之前,我需要检查是否没有其他 apt-get 实例。或 dpkg已经在工作。如果是这种情况,apt-get会失败,因为它已经锁定。 是否足以检查/v
这个问题有很多相关的问题,但没有一个回答我想知道的: 我通常是这样工作的: 安装 python 3.5+ sudo apt install virtualenv virtualenv -p/usr/b
我有一个很久以前安装的 Ubuntu 20.04。出于某种原因,即使我很确定我从未使用过它,我也安装了 OCaml。我试图通过卸载 OCaml sudo apt-get remove ocaml
我编写了一个 Ansible 剧本,其中包括运行 apt-get dist-upgrade。我确保在剧本的顶部有 become: true 和 become_user: root 以获得运行升级的 s
现在我的 Vagrantfile 中有以下内容: config.vm.provision :chef_solo do |chef| chef.cookbooks_path = "cookboo
我使用 gitlab ci 来构建 docker 镜像,我想安装 python。当我构建时,以下是我的 gitlab-ci.yml: image: docker:stable stages: -
我正在尝试在 Ubuntu 16.04 中启动此容器,步骤之一是:RUN apt update && apt install -y sudo 此步骤因暂时无法解析某些存储库而失败。这是此错误的输出:
我卡在了一个点上,我无法进步,很抱歉这个愚蠢的问题。我为此进行了很多搜索,但我不知道我错过了什么。请帮助我。 我研究了 python 中的模块和类。现在我想使用 python 和 apt 进行一些操作
在linux based os的某些软件安装中,我们有时使用apt update,有时使用apt-get update。 linux终端究竟如何理解apt only和apt-get的含义? 最佳答案
我正在编写 Puppet list ,以便在我的机器上安装大量软件。 许多软件包仅具有 PPA 中最新版本的二进制文件,例如名为 AutoKey 的非常方便的服务。 . 要安装此最新版本的软件包,必须
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 2年前关闭。 Improve thi
我正在编写我的 k8s 升级 ansible 剧本,其中我需要做 apt-mark unhold kubeadm .现在,我试图避免使用 ansible command或 shell调用模块apt如果
我是一名优秀的程序员,十分优秀!