无法使用Chef安装软件包

时间:2018-12-21 23:36:06

标签: windows chef

Error executing action `install` on resource 'windows_package[autologon]'
           ================================================================================

           Chef::Exceptions::CannotDetermineWindowsInstallerType
           -----------------------------------------------------
           Installer type for Windows Package 'autologon' not specified and cannot be determined from file extension 'exe'

           Resource Declaration:
           ---------------------
           # In C:/Users/kitchen/AppData/Local/Temp/kitchen/cache/cookbooks/rclient/recipes/windows.rb

            26: windows_package 'autologon' do
            27:   source "#{node['rclient']['remote_root_url']}/autologon/3.10/Autologon.exe"
            28: end
            29:

对于IEDriverServer.exe和msys2-x86_64-20161025.exe软件包,也存在同样的问题。

1 个答案:

答案 0 :(得分:0)

有关信息,请参见https://docs.chef.io/resource_windows_package.html。您几乎肯定需要指定:installer_type

https://github.com/chef/chef/blob/master/lib/chef/provider/package/windows.rb#L91是产生您所看到的错误的方法。