{"record":{"id":"84631a5a6704f58c","repo":"hashicorp/vagrant","slug":"the-license-file-to-install-could-not-be-found-pl","errorCode":null,"errorMessage":"The license file to install could not be found. Please verify the path you gave is correct. The path to the license file given was: '%{path}'","messagePattern":"The license file to install could not be found\\. Please verify the path you gave is correct\\. The path to the license file given was: '%(.+?)'","errorType":"exception","errorClass":"Vagrant::Errors::PluginInstallLicenseNotFound","httpStatus":null,"severity":"error","filePath":"plugins/commands/plugin/action/license_plugin.rb","lineNumber":26,"sourceCode":"\nrequire \"log4r\"\n\nmodule VagrantPlugins\n  module CommandPlugin\n    module Action\n      # This middleware licenses a plugin by copying the license file to\n      # the proper place.\n      class LicensePlugin\n        def initialize(app, env)\n          @app    = app\n          @logger = Log4r::Logger.new(\"vagrant::plugins::plugincommand::license\")\n        end\n\n        def call(env)\n          # Verify the license file exists\n          license_file = Pathname.new(env[:plugin_license_path])\n          if !license_file.file?\n            raise Vagrant::Errors::PluginInstallLicenseNotFound,\n              name: env[:plugin_name],\n              path: license_file.to_s\n          end\n\n          # Copy it in.\n          final_path = env[:home_path].join(\"license-#{env[:plugin_name]}.lic\")\n          @logger.info(\"Copying license from: #{license_file}\")\n          @logger.info(\"Copying license to: #{final_path}\")\n          env[:ui].info(I18n.t(\"vagrant.commands.plugin.installing_license\",\n                               name: env[:plugin_name]))\n          FileUtils.cp(license_file, final_path)\n\n          # Installed!\n          env[:ui].success(I18n.t(\"vagrant.commands.plugin.installed_license\",\n                                 name: env[:plugin_name]))\n\n          @app.call(env)\n        end","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/plugin/action/license_plugin.rb#L8-L44","documentation":"The LicensePlugin middleware, invoked by `vagrant plugin license <name> <license-file>`, checks Pathname(env[:plugin_license_path]).file? and raises Vagrant::Errors::PluginInstallLicenseNotFound when the path is not an existing regular file, interpolating %{name} and %{path}. It fires before any copy happens.","triggerScenarios":"`vagrant plugin license my-plugin ./license.lic` when license.lic is not in the current directory; a typo'd filename; passing a directory; a path correct in your editor but wrong relative to where vagrant runs.","commonSituations":"Commercial plugins (e.g. the VMware provider) deliver a .lic file by download or email; users save it in Downloads or a project subfolder and pass a stale relative path.","solutions":["Confirm the file exists: `ls -l <path>` from the directory where you run vagrant.","Re-run with an absolute path: `vagrant plugin license <name> /abs/path/to/license.lic`.","If the file is gone, re-download the license from the vendor portal and retry."],"exampleFix":"# before\nvagrant plugin license vagrant-vmware-desktop license.lic   # wrong cwd\n# after\nvagrant plugin license vagrant-vmware-desktop /home/me/Downloads/license.lic","handlingStrategy":"validation","validationCode":"name, lic = ARGV\nlic = File.expand_path(lic) if lic\nabort 'usage: vagrant plugin license <name> <existing-file>' unless name && lic && File.file?(lic)\nsystem('vagrant', 'plugin', 'license', name, lic)","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Environment.new.cli(['plugin', 'license', name, lic])\nrescue Vagrant::Errors::PluginInstallLicenseNotFound => e\n  warn e.extra_data[:path]\n  exit 1\nend","preventionTips":["Always pass an absolute path to the .lic file.","Verify the download actually landed (ls -l) before licensing.","Keep licenses out of the repo; store them under a stable path like ~/.vagrant.d/licenses/."],"tags":["vagrant","plugin","license","file-not-found"],"backgroundTag":"license-file-not-found","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}