Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: Vagrant up failure #2685

Closed
mcyzyk opened this issue Aug 18, 2023 · 12 comments
Closed

Q: Vagrant up failure #2685

mcyzyk opened this issue Aug 18, 2023 · 12 comments

Comments

@mcyzyk
Copy link

mcyzyk commented Aug 18, 2023

vagrant up
Vagrant failed to initialize at a very early stage:

The plugins failed to initialize correctly. This may be due to manual
modifications made within the Vagrant home directory. Vagrant can
attempt to automatically correct this issue by running:

  vagrant plugin repair

If Vagrant was recently updated, this error may be due to incompatible
versions of dependencies. To fix this problem please remove and re-install
all plugins. Vagrant can attempt to do this automatically by running:

  vagrant plugin expunge --reinstall

Or you may want to try updating the installed plugins to their latest
versions:

  vagrant plugin update

Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-goodhosts (= 1.1.4)'

My vagrant-goodhosts plugin has been upgraded to the latest version 1.1.6, but no matter what I do Vagrant is looking for a specific version, the old version, 1.1.4.

Not sure how to remedy!

Mark

@welcome
Copy link

welcome bot commented Aug 18, 2023

Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/

VVV
Join the VVV Slack Workspace

@tomjn
Copy link
Member

tomjn commented Aug 18, 2023

Add --local to the end of the command, the commands you ran affect globally installed vagrant plugins, but we use --local so you don't have to type out the names of all the plugins VVV needs.

Here's the issue and the PR to fix it by mentioning --local in the command over at vagrant but they've kind of stalled for some reason:

hashicorp/vagrant#13030

hashicorp/vagrant#13029

@tomjn tomjn closed this as completed Aug 18, 2023
@tomjn
Copy link
Member

tomjn commented Aug 18, 2023

The vagrant plugin expunge --reinstall command aka vagrant plugin expunge --reinstall --local

@mcyzyk
Copy link
Author

mcyzyk commented Nov 6, 2024

All of the sudden, I'm getting dependency errors with Vagrant plugins. Realizing this happened a while back, I looked up this Ticket. Based on it, I run:

vagrant plugin expunge --reinstall --local

But no matter what I do, I keep getting the dependency error:

Install local plugins (Y/N) [N]: y
Installing the 'vagrant-goodhosts' plugin. This can take a few minutes...
Vagrant failed to initialize at a very early stage:

Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

conflicting dependencies logger (= 1.6.0) and logger (= 1.6.1)
  Activated logger-1.6.1
  which does not match conflicting dependency (= 1.6.0)

  Conflicting dependency chains:
    logger (= 1.6.1), 1.6.1 activated

  versus:
    logger (= 1.6.0)

  Gems matching logger (= 1.6.0):
    logger-1.6.0

Not sure how to remedy if vagrant plugin expunge --reinstall --local does not work.

1 similar comment
@mcyzyk
Copy link
Author

mcyzyk commented Nov 7, 2024

All of the sudden, I'm getting dependency errors with Vagrant plugins. Realizing this happened a while back, I looked up this Ticket. Based on it, I run:

vagrant plugin expunge --reinstall --local

But no matter what I do, I keep getting the dependency error:

Install local plugins (Y/N) [N]: y
Installing the 'vagrant-goodhosts' plugin. This can take a few minutes...
Vagrant failed to initialize at a very early stage:

Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

conflicting dependencies logger (= 1.6.0) and logger (= 1.6.1)
  Activated logger-1.6.1
  which does not match conflicting dependency (= 1.6.0)

  Conflicting dependency chains:
    logger (= 1.6.1), 1.6.1 activated

  versus:
    logger (= 1.6.0)

  Gems matching logger (= 1.6.0):
    logger-1.6.0

Not sure how to remedy if vagrant plugin expunge --reinstall --local does not work.

@mcyzyk
Copy link
Author

mcyzyk commented Nov 7, 2024

Same problem, with suggested, temporary solution:
hashicorp/vagrant#13534

export VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1

@tomjn
Copy link
Member

tomjn commented Nov 7, 2024

@mcyzyk have you recently updated vagrant? @Mte90 is this a simple bundle update to fix in goodhosts? Or would that fix it for the new version and break it for older versions of vagrant?

@Mte90
Copy link
Member

Mte90 commented Nov 7, 2024

What is the plugin issue that creates the issue?
Because our plugin has just os has dependency https://github.com/goodhosts/vagrant/blob/main/vagrant-goodhosts.gemspec

GitHub
Vagrant plugin that use goodhosts to manipulate hosts files - goodhosts/vagrant

@tomjn
Copy link
Member

tomjn commented Nov 7, 2024

Don't we have a vagrant dependency? https://github.com/goodhosts/vagrant/blob/main/Gemfile#L5

GitHub
Vagrant plugin that use goodhosts to manipulate hosts files - goodhosts/vagrant

@Mte90
Copy link
Member

Mte90 commented Nov 7, 2024

I think that is only for development, downloading the last gem https://github.com/goodhosts/vagrant/releases/tag/1.1.7 and checking the metadata I don't find any reference to that dependency.
Infact on https://rubygems.org/gems/vagrant-goodhosts mention only the so dependency.

I think that the user is using an old version of vagrant or the plugin.

GitHub
Updated goodhosts bundle to latest 1.1.2 release

@mcyzyk
Copy link
Author

mcyzyk commented Nov 7, 2024

FYI, I am running Vagrant version 2.4.2-1 here.

@Mte90
Copy link
Member

Mte90 commented Nov 7, 2024

I have the same issue with the vagrant 2.4.2 and the plugin 1.1.7 release (also just packaged).

It seems a bug in vagrant hashicorp/vagrant#13527 and the fix was aalready merged so we need just to wait for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants