hashicorp/vagrant · error · Vagrant::Errors::PluginInstallFailed

Vagrant was unable to install the requested plugin: '%{name}

Error message

Vagrant was unable to install the requested plugin: '%{name}'
Please try to install this plugin again. If Vagrant is still unable
to install the requested plugin, please report this error.

What it means

Error "Vagrant was unable to install the requested plugin: '%{name}' Please try to install this plugin again. If Vagrant is still unable to install the requested plugin, please report this error." thrown in hashicorp/vagrant.

Source

Thrown at lib/vagrant/plugin/manager.rb:174

        if result
          # Add the plugin to the state file
          plugin_file = opts[:env_local] ? @local_file : @user_file
          plugin_file.add_plugin(
            result.name,
            version: opts[:version],
            require: opts[:require],
            sources: opts[:sources],
            env_local: !!opts[:env_local],
            installed_gem_version: result.version.to_s
          )
        else
          r = Gem::Dependency.new(name, opts[:version])
          result = Gem::Specification.find { |s|
            s.satisfies_requirement?(r) &&
              s.activated?
          }
          raise Errors::PluginInstallFailed,
            name: name if result.nil?
          @logger.warn("Plugin install returned no result as no new plugins were installed.")
        end
        # After install clean plugin gems to remove any cruft. This is useful
        # for removing outdated dependencies or other versions of an installed
        # plugin if the plugin is upgraded/downgraded
        Vagrant::Bundler.instance.clean(installed_plugins, local: !!opts[:local])
        result
      rescue Gem::GemNotFoundException
        raise Errors::PluginGemNotFound, name: name
      rescue Gem::Exception => err
        @logger.warn("Failed to install plugin: #{err}")
        @logger.debug("#{err.class}: #{err}\n#{err.backtrace.join("\n")}")
        # Try and determine a cause for the failure
        case err.message
        when /install development tools first/
          raise Errors::PluginNeedsDeveloperTools
        when /library not found in default locations/

View on GitHub (pinned to 35f3160f4a)

When it happens

Trigger: Thrown at lib/vagrant/plugin/manager.rb:174 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21). Data as JSON: /api/errors/aeda89304199cf7e. Report an issue: GitHub.