使用chef安装kafka时出现ruby文件解压缩错误

23c0lvtd  于 2021-06-05  发布在  Kafka
关注(0)|答案(0)|浏览(438)

我试图安装Kafka使用超市食谱作为我的出发点。但当我运行时,它会给我以下错误。它应该是档案中固有的东西。你觉得呢?平台厨房Ubuntu14.04 tar版本1.27.1

execute 'kafka-install' do
    cwd node['kafka']['install_dir']
    command <<-EOH
    wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz && \
    tar -zxf kafka_2.12-2.5.0.tgz && \
    useradd -M #{node['kafka']['user']} && \
    chown #{node['kafka']['user']}:#{node['kafka']['group']} -R #{node['kafka']['install_dir']} && \
    chown +x /kafka/bin/*.sh
  EOH
end

我得到以下错误

Error executing action `run` on resource 'execute[kafka-install]'
       ================================================================================

       Mixlib::ShellOut::ShellCommandFailed
       ------------------------------------
       Expected process to exit with [0], but received '2'
       ---- Begin output of     wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz &&     tar -zxf kafka_2.12-2.5.0.tgz &&     useradd -M kafka &&     chown kafka:kafka -R /kafka &&     chown +x /kafka/bin/*.sh

 ----
   STDOUT:
   STDERR: --2020-06-09 18:21:40--  http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz

 tar: Skipping to next header
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Substituting `.' for empty member name
       tar: .: Unknown file type ' ', extracted as normal file
       tar: .: Cannot open: Is a directory
       tar: Skipping to next header

       gzip: stdin: invalid compressed data--format violated
       tar: Child returned status 1
       tar: Error is not recoverable: exiting now
       ---- End output of     wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz &&     tar -zxf kafka_2.12-2.5.0.tgz &&     useradd -M kafka &&     chown kafka:kafka -R /kafka &&     chown +x /kafka/bin/*.sh
        ----
       Ran     wget http://www-us.apache.org/dist/kafka/2.5.0/kafka_2.12-2.5.0.tgz &&     tar -zxf kafka_2.12-2.5.0.tgz &&     useradd -M kafka &&     chown kafka:kafka -R /kafka &&     chown +x /kafka/bin/*.sh
        returned 2

我在Ubuntu18.04中尝试了tar命令,它运行正常,tar版本1.29

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题