【问题标题】:Error installing chef-client on ubuntu 18.04在 ubuntu 18.04 上安装 chef-client 时出错
【发布时间】:2020-06-20 16:46:15
【问题描述】:

我正在执行菜谱的收敛,但收敛失败不是因为菜谱,而是因为安装了 chef-client。这是错误

Preparing to unpack .../cache/chef_16.2.44-1_amd64.deb ...
       Unpacking chef (16.2.44-1) ...
       dpkg-deb (subprocess): decompressing archive member: lzma error: compressed data is corrupt
       dpkg-deb: error: <decompress> subprocess returned error exit status 2
       dpkg: error processing archive /tmp/omnibus/cache/chef_16.2.44-1_amd64.deb (--install):
        cannot copy extracted data for './opt/chef/embedded/lib/libruby.so.2.7.1' to '/opt/chef/embedded/lib/libruby.so.2.7.1.dpkg-new': unexpected end of file or stream
       Errors were encountered while processing:
        /tmp/omnibus/cache/chef_16.2.44-1_amd64.deb

这是我的厨房.yml

driver:
  name: vagrant

provisioner:
  name: chef_zero

verifier:
  name: inspec

platforms:
  - name: ubuntu-20.04
  - name: centos-8
  - name: ubuntu-18.04
  - name: ubuntu-14.04
suites:
  - name: default
    run_list: 
      - recipe[wildfly::default]
    verifier:
      inspec_tests:
        - test/integration/default
    attributes:

【问题讨论】:

    标签: chef-infra test-kitchen


    【解决方案1】:

    我正在使用官方的 ubuntu 18.04 vagrant box

    $ vagrant box list
    ubuntu/bionic64 (virtualbox, 20200618.0.0)
    

    我安装 Chef 16.2.44-1 版没有问题

    Installing chef
    installing with dpkg...
    Selecting previously unselected package chef.
    (Reading database ... 59773 files and directories currently installed.)
    Preparing to unpack .../chef_16.2.44-1_amd64.deb ...
    Unpacking chef (16.2.44-1) ...
    Setting up chef (16.2.44-1) ...
    

    使用您的 kitchen.yml 稍作修改的版本

    driver:
      name: vagrant
      box: ubuntu/bionic64
    
    provisioner:
      name: chef_zero
    
    platforms:
     - name: ubuntu-18.04
    
    suites:
      - name: default
    

    我建议你:

    1. 移至官方 ubuntu 框
    2. 更新您当前使用的bento box
    3. 通过查看系统日志来调试您正在使用的机器,或尝试手动安装 Chef 以更好地了解问题所在

    【讨论】:

      猜你喜欢
      • 2018-12-19
      • 2023-03-22
      • 2021-03-24
      • 1970-01-01
      • 2019-05-22
      • 1970-01-01
      • 2019-06-18
      • 1970-01-01
      相关资源
      最近更新 更多