【问题标题】:Error installing aws-sigv4 (1.0.2) via aws cookbook 7.2.1通过 aws cookbook 7.2.1 安装 aws-sigv4 (1.0.2) 时出错
【发布时间】:2018-04-13 06:02:55
【问题描述】:

我正在尝试使用 aws 食谱 7.2.1 版,以便可以对 cloudformation_stack 资源使用 named_iam_capability 选项。这样我就可以为启动的实例分配一个 IAM 角色。这是在带有 Chef 12.19.36 的 Ubuntu 14.04 LTS 上运行的,但出现以下错误。

有什么办法可以解决这个错误吗?

31-Oct-2017 10:47:14    [2017-10-30T23:47:14+00:00] ERROR: Running exception handlers
31-Oct-2017 10:47:14    [2017-10-30T23:47:14+00:00] ERROR: Exception handlers complete
31-Oct-2017 10:47:14    [2017-10-30T23:47:14+00:00] FATAL: Stacktrace dumped to /home/bamboo/.chef/cache/chef-stacktrace.out
31-Oct-2017 10:47:14    [2017-10-30T23:47:14+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
31-Oct-2017 10:47:14    [2017-10-30T23:47:14+00:00] ERROR: Expected process to exit with [0], but received '5'
31-Oct-2017 10:47:14    ---- Begin output of bundle install ----
31-Oct-2017 10:47:14    STDOUT: Fetching gem metadata from https://rubygems.org/
31-Oct-2017 10:47:14    Fetching version metadata from https://rubygems.org/
31-Oct-2017 10:47:14    Resolving dependencies...
31-Oct-2017 10:47:14    
31-Oct-2017 10:47:14    Bundler::GemspecError: Could not read gem at /opt/chefdk/embedded/lib/ruby/gems/2.3.0/cache/aws-sigv4-1.0.2.gem. It may be corrupted.
31-Oct-2017 10:47:14    Using jmespath 1.3.1
31-Oct-2017 10:47:14    Using bundler 1.12.5
31-Oct-2017 10:47:14    An error occurred while installing aws-sigv4 (1.0.2), and Bundler cannot
31-Oct-2017 10:47:14    continue.
31-Oct-2017 10:47:14    Make sure that `gem install aws-sigv4 -v '1.0.2'` succeeds before bundling.
31-Oct-2017 10:47:14    STDERR: sudo: no tty present and no askpass program specified
31-Oct-2017 10:47:14    sudo: no tty present and no askpass program specified
31-Oct-2017 10:47:14    ---- End output of bundle install ----
31-Oct-2017 10:47:14    Ran bundle install returned 5
31-Oct-2017 10:47:14    [2017-10-30T23:47:14+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

【问题讨论】:

  • 您是否以 root 身份运行 chef-client
  • 我不确定。我该如何检查?
  • 你是如何运行它的?
  • 它以竹用户身份运行。我通过竹子运行它。
  • 文件夹 /opt/chefdk/embedded/lib/ruby/gems/2.3.0/cache 不存在。

标签: amazon-web-services rubygems chef-infra chef-recipe


【解决方案1】:

您需要以 root 身份运行 chef-client 才能使某些功能正常工作,包括 gem 安装。在大多数 Linux 系统上使用 sudo chef-client

【讨论】:

    猜你喜欢
    • 2020-02-03
    • 1970-01-01
    • 2018-07-05
    • 1970-01-01
    • 1970-01-01
    • 2018-08-31
    • 1970-01-01
    • 2017-10-28
    • 2021-02-01
    相关资源
    最近更新 更多