#16258·chef

archive_file resource unavailable in 18.11.11

Author: splatteredbitsCreated Aug 6, 2026Updated Sep 1, 2026
LabelsStatus: Untriaged

Description

On Windows Server 2022, I have an archive_file resource. When I converge, I see this output that the underlying ZIP archive library isn't available, so archive_file won't be available.

       ffi-libarchive could not be loaded: Could not open library 'libarchive.so.13': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'libarchive.so.13.dll': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'libarchive.13': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'libarchive.13.dll': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'libarchive-13': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'libarchive-13.dll': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'libarchive.so': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'libarchive.so.dll': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'libarchive': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'libarchive.dll': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'archive': Failed with error 126: The specified module could not be found.
       .
       Could not open library 'archive.dll': Failed with error 126: The specified module could not be found.
       .
       Searched in <system library path>, /usr/lib, /usr/local/lib, /opt/local/lib
       libarchive is probably not installed on system, archive_file will not be available

Chef Version

$ cinc --version Cinc Workstation version: 25.13.7 Cinc Client version: 18.10.17 Cinc Auditor version: 5.24.7 Cinc CLI version: 5.6.23 Biome version: 1.6.821 Test Kitchen version: 3.9.1 Cookstyle version: 7.32.8

Platform Version

Windows 2022

Replication Case

ruby
pkg_url =
  if windows?
    'https://proget.webmdhealthservices.net/endpoints/Installers/content/pgutil/pgutil-2.2.7-win-x64.zip'
  else
    'https://proget.webmdhealthservices.net/endpoints/Installers/content/pgutil/pgutil-2.2.7-linux-x64.zip'
  end

pkg_checksum = 
  if windows?
    'cb3f09551fd34c5020a4ac9490dd7f2d7c95a3a6b22e663c238ede2ef1d46f2c'
  else
    'dedaf67d8cd3e974d1d9601cfaddc0666d46318c7b9226909d1499e49aab121d'
  end

archive_cache_path = ::File.join(Chef::Config[:file_cache_path], 'pgutil.zip')
extracted_cache_path = ::File.join(Chef::Config[:file_cache_path], 'pgutil')
remote_file archive_cache_path do
  source pkg_url
  checksum pkg_checksum
  notifies :extract, "archive_file[#{archive_cache_path}]", :immediately
end

binary_name = windows? ? 'pgutil.exe' : 'pgutil'
extracted_binary_path = ::File.join(extracted_cache_path, binary_name)

archive_file archive_cache_path do
  destination extracted_cache_path
  overwrite true
  action :nothing
end

Client Output

         * archive_file[C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/pgutil.zip] action nothing[2026-08-05T23:54:59+00:00] INFO: Processing archive_file[C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/pgutil.zip] action nothing (whs_build_server::_agent_pgutil line 12)
        (skipped due to action :nothing)
         * remote_file[C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/pgutil.zip] action create[2026-08-05T23:54:59+00:00] INFO: Processing remote_file[C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/pgutil.zip] action create (whs_build_server::_agent_pgutil line 18)
        (up to date)
         * directory[C:/pgutil] action create[2026-08-05T23:54:59+00:00] INFO: Processing directory[C:/pgutil] action create (whs_build_server::_agent_pgutil line 27)
        (up to date)
         * remote_file[C:/pgutil/pgutil.exe] action create[2026-08-05T23:54:59+00:00] INFO: Processing remote_file[C:/pgutil/pgutil.exe] action create (whs_build_server::_agent_pgutil line 29)
       [2026-08-05T23:54:59+00:00] WARN: remote_file[C:/pgutil/pgutil.exe] cannot be downloaded from file:///C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/pgutil/pgutil.exe: No such file or directory @ rb_sysopen - C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/pgutil/pgutil.exe
       
           
           ================================================================================
           Error executing action `create` on resource 'remote_file[C:/pgutil/pgutil.exe]'
           ================================================================================
           
           Errno::ENOENT
           -------------
           No such file or directory @ rb_sysopen - C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/pgutil/pgutil.exe
           
           Resource Declaration:
           ---------------------
           # In C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/********/recipes/_agent_pgutil.rb
           
            29: remote_file install_path do
            30:   source "file:///#{extracted_binary_path}"
            31:   owner 'root' unless windows?
            32:   group 'root' unless windows?
            33:   mode '0755' unless windows?
            34: end
            35: 
           
           Compiled Resource:
           ------------------
           # Declared in C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/cookbooks/********/recipes/_agent_pgutil.rb:29:in `from_file'
           
           remote_file("C:/pgutil/pgutil.exe") do
             action [:create]
             default_guard_interpreter :default
             source ["file:///C:/Users/vagrant/AppData/Local/Temp/kitchen/cache/pgutil/pgutil.exe"]
             declared_type :remote_file
             cookbook_name "********"
             recipe_name "_agent_pgutil"
             path "C:/pgutil/pgutil.exe"
           end
           
           System Info:
           ------------
           chef_version=18.11.11
           platform=windows
           platform_version=10.0.20348
           ruby=ruby 3.1.7p261 (2025-03-26 revision 0a3704f218) [x64-mingw-ucrt]
           program_name=C:/cinc-project/cinc/bin/cinc-client
           executable=C:/cinc-project/cinc/bin/cinc-client