Windows命令行tar“无法连接到d:解析失败”。和厨师刀 [英] Windows command line tar "cannot connect to d: resolve failed" with Chef Knife

查看:434
本文介绍了Windows命令行tar“无法连接到d:解析失败”。和厨师刀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用安装了cygwin,chef和ruby的Windows命令行。尝试

Using Windows Command line with cygwin, chef and ruby installed. When trying

knife cookbook site install mysql

返回以下错误

Begin output of tar zxvf D:/path/to/chef-repo/cookbooks/mysql.tar.gz  
STDOUT:  
STDERR: tar<child>: Cannot connect to D: resolve failed  
gzip: stdin: undexpected end of file  
tar: Child returned status 128  
tar:  Error is not recoverable: exiting now</code>

如何解决此问题?我可以使用

How can I remedy this issue? I can manually unzip using

tar zxvf mysql.tar.gz  

但这并不理想。我认为这与文件名中的冒号有关,但是我该如何更改在刀或厨师的偏好?

but this is less than ideal. I believe this has to do with the colon in filename but how can I change that in the knife or chef preferences?

推荐答案

原因是 tar 解释了冒号(),因为它是另一台计算机上的文件。您可以使用标志-force-local 禁用此行为。

The reason is that tar interprets colons (:) in file names as meaning it is a file on another machine. You can disable this behavior by using the flag --force-local.

这是来自< a href = https://unix.stackexchange.com/a/13381/146563>此处。

这篇关于Windows命令行tar“无法连接到d:解析失败”。和厨师刀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆