puppetlabs/puppet · error · Puppet::ModuleTool::Errors::InstallConflictError
'%{module_name}' (%{version}) requested; installation confli
Error message
'%{module_name}' (%{version}) requested; installation conflict What it means
Installer raises Puppet::ModuleTool::InstallConflictError during the pre-install conflict check: a release in the resolved set maps to a short name that collides with a directory on the modulepath, but the installed module's forge name differs (i.e. a different author's module occupies that directory name). dependency is set when the colliding release is a transitive dependency rather than the requested module; directory and metadata of the existing module are included.
Source
Thrown at lib/puppet/module_tool/applications/installer.rb:211
:unsatisfied => unsatisfied
)
end
unless forced?
# Check for module name conflicts.
releases.each do |rel|
installed_module = installed_modules_source.by_name[rel.name.split('-').last]
next unless installed_module
next if installed_module.has_metadata? && installed_module.forge_name.tr('/', '-') == rel.name
if rel.name != name
dependency = {
:name => rel.name,
:version => rel.version
}
end
raise InstallConflictError,
:requested_module => name,
:requested_version => options[:version] || 'latest',
:dependency => dependency,
:directory => installed_module.path,
:metadata => installed_module.metadata
end
end
Puppet.info _("Preparing to install ...")
releases.each(&:prepare)
Puppet.notice _('Installing -- do not interrupt ...')
releases.each do |release|
installed = installed_modules[release.name]
if forced? || installed.nil?
release.install(Pathname.new(results[:install_dir]))
else
release.install(Pathname.new(installed.mod.modulepath))View on GitHub (pinned to e227c27540)
Solutions
- Uninstall or remove the existing conflicting module from that modulepath directory first.
- If both are legitimately needed, relocate one to a different modulepath entry prioritized for that environment.
- Verify you are installing the intended author slug (check the error's :directory and :metadata to identify the incumbent).
- Use --force only if you accept overwriting the other module's directory.
Example fix
# before puppet module install acme-stdlib # site-modules/stdlib holds puppetlabs-stdlib # after puppet module uninstall puppetlabs-stdlib && puppet module install acme-stdlib
Defensive patterns
Strategy: validation
Validate before calling
shortname = release_name.split('-').last
existing = environment.modules.find { |m| File.basename(m.path) == shortname }
if existing && existing.forge_name&.tr('/', '-') != release_name
abort "directory #{shortname} already holds #{existing.forge_name}; uninstall first"
end Try / catch
begin installer.run rescue Puppet::ModuleTool::InstallConflictError => e # e.multiline_options carries :directory and :dependency handle_conflict(e.multiline_options[:directory]) end
Prevention
- Standardize on a single source (Forge or internal fork) per module shortname.
- Before installing a fork, uninstall the incumbent module or move it off the modulepath.
- In CI, assert that modulepath shortnames map 1:1 to expected forge names.
When it happens
Trigger: Thrown at lib/puppet/module_tool/applications/installer.rb:211 when the library encounters an invalid state.
Common situations: Two teams maintaining same-named modules internally and from the Forge; installing a Forge fork under a different author slug over an existing module directory; leftover directories from renamed modules on shared modulepaths.
Related errors
- '%{module_name}' (%{version}) requested; installation confli
- '%{module_name}' (%{version}) requested; '%{module_name}' (%
- Could not %{action} '%{module_name}'; no releases are availa
- Could not %{action} '%{module_name}'; module appears in mult
- Could not %{action} '%{module_name}'; module is not installe
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/9b9b2fe8c7ed8a13.
Report an issue: GitHub.