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

Vagrant is missing plugins required by the currently loaded

Error message

Vagrant is missing plugins required by the currently loaded Vagrantfile.
Please install the configured plugins and run this command again. The
following plugins are currently missing:

  %{plugins}

To install the plugins configured in the current Vagrantfile run the
following command:

  vagrant plugin install --local

What it means

Raised as Vagrant::Errors::PluginMissingLocalError from process_configured_plugins (lib/vagrant/environment.rb:1042) when plugins declared under config.vagrant.plugins in the Vagrantfile are not installed and the user declines installation. Vagrant first warns, then (unless VAGRANT_INSTALL_LOCAL_PLUGINS is set for auto-install) asks y/N; answering n (the default on empty input) raises this listing the missing plugins and telling you to run `vagrant plugin install --local`.

Source

Thrown at lib/vagrant/environment.rb:1042

      needs_install = []
      config_plugins = find_configured_plugins
      config_plugins.each do |name, info|
        if !installed[name]
          needs_install << name
        end
      end
      if !needs_install.empty?
        ui.warn(I18n.t("vagrant.plugins.local.uninstalled_plugins",
          plugins: needs_install.sort.join(", ")))
        if !Vagrant.auto_install_local_plugins?
          answer = nil
          until ["y", "n"].include?(answer)
            answer = ui.ask(I18n.t("vagrant.plugins.local.request_plugin_install") + " [N]: ")
            answer = answer.strip.downcase
            answer = "n" if answer.to_s.empty?
          end
          if answer == "n"
            raise Errors::PluginMissingLocalError,
              plugins: needs_install.sort.join(", ")
          end
        end
        needs_install.each do |name|
          pconfig = Util::HashWithIndifferentAccess.new(config_plugins[name])
          ui.info(I18n.t("vagrant.commands.plugin.installing", name: name))

          options = {sources: Vagrant::Bundler::DEFAULT_GEM_SOURCES.dup, env_local: true}
          options[:sources] = pconfig[:sources] if pconfig[:sources]
          options[:require] = pconfig[:entry_point] if pconfig[:entry_point]
          options[:version] = pconfig[:version] if pconfig[:version]

          spec = Plugin::Manager.instance.install_plugin(name, **options)

          ui.info(I18n.t("vagrant.commands.plugin.installed",
            name: spec.name, version: spec.version.to_s))
        end
        ui.info("\n")

View on GitHub (pinned to 35f3160f4a)

Solutions

  1. Run `vagrant plugin install --local` in the project directory — it installs exactly the Vagrantfile-declared plugins
  2. Or answer 'y' when prompted during the vagrant command
  3. For unattended/CI runs, export VAGRANT_INSTALL_LOCAL_PLUGINS=1 so local plugins install without the prompt
  4. Verify with `vagrant plugin list` and re-run your command

Example fix

# before
$ vagrant up
...request to install missing plugins... [N]: n
PluginMissingLocalError

# after
$ vagrant plugin install --local
$ vagrant up
Defensive patterns

Strategy: validation

Validate before calling

# Pre-flight: are all Vagrantfile-declared plugins installed?
declared = (env.vagrantfile.config.vagrant.plugins || {}).keys.map(&:to_s)
installed = Vagrant::Plugin::Manager.instance.installed_plugins.keys
missing = declared - installed
system("vagrant", "plugin", "install", "--local") if missing.any?

Try / catch

begin
  env = Vagrant::Environment.new(cwd: dir)
rescue Vagrant::Errors::PluginMissingLocalError => e
  abort "Missing local plugins (#{e.extra_data[:plugins]}). Run: vagrant plugin install --local"
end

Prevention

When it happens

Trigger: A fresh clone of a project whose Vagrantfile lists local plugins, on a machine without them; answering 'n' (or just Enter) at the install prompt; CI with no TTY where the prompt defaults to 'n'; after `vagrant plugin expunge` removed them.

Common situations: Team onboarding and CI pipelines that clone a repo using config.vagrant.plugins without a plugin-provisioning step; rebuilding a workstation and forgetting the project's local plugins.

Related errors


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