command-line - Windows 命令行 tar "cannot connect to d: resolve failed"使用 Chef Knife

标签 command-line gzip tar chef-infra

使用 Windows 命令行并安装了 cygwin、chef 和 ruby​​。尝试时

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>

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

手动解压缩
tar zxvf mysql.tar.gz  

但这并不理想。我相信这与colon in filename有关但我怎样才能改变 Knife 或 Chef 的偏好呢?

最佳答案

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

这是来自here的回答.

关于command-line - Windows 命令行 tar "cannot connect to d: resolve failed"使用 Chef Knife,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12823499/

相关文章:

cookies - 如何在虚拟机上通过命令行获取kaggle比赛数据?

ios - 命令 PhaseScriptExecution 因非零退出代码 flutter 而失败

用于快速编辑命令行参数的 Eclipse 插件/ View

perl - 如何将控制台输出重定向到文本文件

java - 如何使用多个 tar 文件创建单个 .tar 文件

python - flask send_file 不适用于 tar.gz 文件

linux - 从字符串中压缩

spring - GZip 压缩在 Internet Explorer 11 中不工作,但在 Chrome 和 Firefox 中工作正常

unix - 创建给定大小的 gzip block (填充)

linux - system ("tar xzf DirName/tarFile.tar DirNameInsideTar/FileName") 在 perl 中失败并返回 -1