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

Vagrant failed to install the requested plugin because it de

Error message

Vagrant failed to install the requested plugin because it depends
on development files for a library which is not currently installed
on this system. The following library is required by the '%{name}'
plugin:

  %{library}

If a package manager is used on this system, please install the development
package for the library. The name of the package will be similar to:

  %{library}-dev or %{library}-devel

After the library and development files have been installed, please
run the command again.

What it means

Error "Vagrant failed to install the requested plugin because it depends on development files for a library which is not currently installed on this system. The following library is required by the '%{name}' plugin: %{library} If a package manager is used on this system, please install the development package for the library. The name of the package will be similar to: %{library}-dev or %{library}-devel After the library and development files have been installed, please run the command again." thrown in hashicorp/vagrant.

Source

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

        # 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/
          lib = err.message.match(/(\w+) library not found in default locations/)
          if lib.nil?
            raise Errors::BundlerError, message: err.message
          end
          raise Errors::PluginMissingLibrary,
            library: lib.captures.first,
            name: name
        when /find header files for ruby/
          raise Errors::PluginMissingRubyDev
        else
          raise Errors::BundlerError, message: err.message
        end
      end

      # Uninstalls the plugin with the given name.
      #
      # @param [String] name
      def uninstall_plugin(name, **opts)
        if @system_file
          if !@user_file.has_plugin?(name) && @system_file.has_plugin?(name)
            raise Errors::PluginUninstallSystem,
              name: name
          end

View on GitHub (pinned to 35f3160f4a)

When it happens

Trigger: Thrown at lib/vagrant/plugin/manager.rb:197 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/24ed69a0f7022b48. Report an issue: GitHub.