【问题标题】:Puppet-Librarian, windows and Error: No such file or directoryPuppet-Librarian、windows 和错误:没有这样的文件或目录
【发布时间】:2015-12-04 08:59:58
【问题描述】:

在 Windows 2012 服务器版上,当我运行 puppet-librarian install 时,出现以下错误。

Error: No such file or directory - C:/Users/Administrator/infrastructure/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/opentable-windowsfeature/999.999.999/cache/tmp-unpacker20150907-1308-19kvk70/opentable-windowsfeature- 999.999.999/spec/acceptance/nodesets/windows-2008R2-serverstandard-x64.yml Error: Try 'puppet help module install' for usage

我认为这是一个通用的 Windows 问题,我花了一段时间才弄清楚错误。 Windows 的绝对文件名最大长度为 255 个字符。 Puppet-librarian 没有给出好的错误消息来表明这是根本原因。 Maximum filename length in NTFS (Windows XP and Windows Vista)?.

【问题讨论】:

  • librarian-puppet 不适用于路径中的空间。对 Windows 不友好。
  • 感谢您指出这一点。当我从 shell 复制错误消息时,引入了这些空格;实际的文件路径没有它们。

标签: puppet librarian-puppet


【解决方案1】:

文件路径长的问题可能是因为 puppet-librarian 使用 PMT(Puppet Module Tool)安装模块。更糟糕的是,Librarian 从这条路径 C:/Users/Administrator/infrastructure/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/opentable-windowsfeature/999.999.999/ 开始,它已经很长了,然后 PMT 将 cache/tmp-unpacker20150907-1308-19kvk70/opentable-windowsfeature-999.999.999 添加到路径中,这更加加剧了长度。

PMT 存在路径较长的问题。我们将通过在未来版本中添加 LFN(长文件名)支持来解决这个问题。投票并观看PUP-4866 以了解此问题何时解决。

由于following call,puppet-librarian 似乎也需要修复:

command.push(*[path.to_s, "--module_repository", module_repository, "--modulepath", path.to_s, "--module_working_dir", path.to_s, "--ignore-dependencies", target])

【讨论】:

    【解决方案2】:

    我的解决方案是将根目录从“C:/Users/Administrator/infrastructure”移动到“C:/infrastructure”。

    【讨论】:

      猜你喜欢
      • 2021-10-31
      • 1970-01-01
      • 2020-04-18
      • 2019-11-28
      • 2015-10-24
      • 2016-12-02
      • 1970-01-01
      • 2013-08-08
      • 2013-11-04
      相关资源
      最近更新 更多