在 ubuntu 18.04 上安装 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:

我正在使用官方的 ubuntu 18.04 流浪者盒子

$ 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. 更新您当前使用的便当盒
  3. 通过查看系统日志来调试您正在使用的框,或尝试手动安装 Chef 以更好地了解问题所在

最新更新