2

I am performing the convergence of a recipe but the convergence fails not because of the recipe but because of the installation of chef-client. This is error

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

this is my kitchen.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:

1 Answers1

0

i am using official ubuntu 18.04 vagrant box

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

and i have no issue installing chef version 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) ...

using slightly modified version of your kitchen.yml

driver:
  name: vagrant
  box: ubuntu/bionic64

provisioner:
  name: chef_zero

platforms:
 - name: ubuntu-18.04

suites:
  - name: default

i suggest you to:

  1. move to official ubuntu box
  2. update the bento box that you are currently using
  3. debug the box that you are using by looking at the system logs or try to install chef manually to better understand what is the issue
Mr.
  • 9,429
  • 13
  • 58
  • 82