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

fresh install: Installing the 'vagrant-google --version '2.7.0'' plugin... conflicting dependencies google-cloud-env (~> 2.1) and google-cloud-env (~> 1.2) #271

Open
ElijahLynn opened this issue Nov 27, 2024 · 6 comments

Comments

@ElijahLynn
Copy link

ElijahLynn commented Nov 27, 2024

Freshly un/re-installed vagrant with homebrew, then:

vagrant --version
Vagrant 2.4.3
vagrant plugin list
No plugins installed.
vagrant plugin install vagrant-google --plugin-version "2.7.0"

Installing the 'vagrant-google --version '2.7.0'' plugin. This can take a few minutes...
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 google-cloud-env (~> 2.1) and google-cloud-env (~> 1.2)
  Activated google-cloud-env-1.6.0
  which does not match conflicting dependency (~> 2.1)

  Conflicting dependency chains:
    vagrant-google (= 2.7.0), 2.7.0 activated, depends on
    fog-google (~> 1.17.0), 1.17.0 activated, depends on
    google-cloud-env (~> 1.2), 1.6.0 activated

  versus:
    vagrant-google (= 2.7.0), 2.7.0 activated, depends on
    fog-google (~> 1.17.0), 1.17.0 activated, depends on
    google-apis-compute_v1 (~> 0.14), 0.86.0 activated, depends on
    google-apis-core (< 2.a, >= 0.11.0), 0.11.3 activated, depends on
    googleauth (< 2.a, >= 0.16.2), 1.11.2 activated, depends on
    google-cloud-env (~> 2.1)
@ElijahLynn
Copy link
Author

ls -l ~/.vagrant.d/gems/3.1.4/gems
total 0
drwxr-xr-x  12 user  staff  384 Nov 22  2023 addressable-2.8.5/
drwxr-xr-x  11 user  staff  352 Nov 22  2023 declarative-0.0.20/
drwxr-xr-x  10 user  staff  320 Nov 22  2023 faraday-2.7.12/
drwxr-xr-x   6 user  staff  192 Nov 22  2023 faraday-net_http-3.0.2/
drwxr-xr-x  15 user  staff  480 Nov 22  2023 fog-core-2.1.0/
drwxr-xr-x  24 user  staff  768 Nov 22  2023 fog-google-1.17.0/
drwxr-xr-x  16 user  staff  512 Nov 22  2023 fog-json-1.2.0/
drwxr-xr-x  16 user  staff  512 Nov 22  2023 fog-xml-0.1.4/
drwxr-xr-x  12 user  staff  384 Nov 22  2023 formatador-0.3.0/
drwxr-xr-x   8 user  staff  256 Nov 22  2023 google-apis-compute_v1-0.84.0/
drwxr-xr-x   8 user  staff  256 Nov 22  2023 google-apis-core-0.11.2/
drwxr-xr-x   8 user  staff  256 Nov 22  2023 google-apis-dns_v1-0.34.0/
drwxr-xr-x   8 user  staff  256 Nov 22  2023 google-apis-iamcredentials_v1-0.17.0/
drwxr-xr-x   8 user  staff  256 Nov 22  2023 google-apis-monitoring_v3-0.52.0/
drwxr-xr-x   8 user  staff  256 Nov 22  2023 google-apis-pubsub_v1-0.43.0/
drwxr-xr-x   8 user  staff  256 Nov 22  2023 google-apis-sqladmin_v1beta4-0.59.0/
drwxr-xr-x   8 user  staff  256 Nov 22  2023 google-apis-storage_v1-0.30.0/
drwxr-xr-x  11 user  staff  352 Nov 22  2023 google-cloud-env-1.6.0/
drwxr-xr-x  10 user  staff  320 Nov 22  2023 googleauth-1.8.1/
drwxr-xr-x  11 user  staff  352 Nov 22  2023 jwt-2.7.1/
drwxr-xr-x  15 user  staff  480 Nov 22  2023 mini_mime-1.1.5/
drwxr-xr-x  12 user  staff  384 Nov 22  2023 nokogiri-1.15.5-arm64-darwin/
drwxr-xr-x  15 user  staff  480 Nov 22  2023 os-1.1.4/
drwxr-xr-x  11 user  staff  352 Nov 22  2023 public_suffix-5.0.4/
drwxr-xr-x  14 user  staff  448 Nov 22  2023 representable-3.2.0/
drwxr-xr-x  14 user  staff  448 Nov 22  2023 retriable-3.1.2/
drwxr-xr-x  10 user  staff  320 Nov 22  2023 signet-0.18.0/
drwxr-xr-x  13 user  staff  416 Nov 22  2023 trailblazer-option-0.1.2/
drwxr-xr-x  12 user  staff  384 Nov 22  2023 uber-0.1.0/
drwxr-xr-x  20 user  staff  640 Nov 22  2023 vagrant-google-2.7.0/
drwxr-xr-x   8 user  staff  256 Nov 22  2023 webrick-1.8.1/

@ElijahLynn ElijahLynn changed the title Installing the 'vagrant-google --version '2.7.0'' plugin... conflicting dependencies google-cloud-env (~> 2.1) and google-cloud-env (~> 1.2) fresh install: Installing the 'vagrant-google --version '2.7.0'' plugin... conflicting dependencies google-cloud-env (~> 2.1) and google-cloud-env (~> 1.2) Nov 27, 2024
@ElijahLynn
Copy link
Author

ElijahLynn commented Nov 27, 2024

PR that I am tinkering with here to:

@ElijahLynn
Copy link
Author

ElijahLynn commented Nov 27, 2024

Tried nuking gems, no go:

pwd
/Users/user/.vagrant.d/gems

ls -al
total 0
drwxr-xr-x   4 user  staff  128 Nov 27 12:11 ./
drwxr-xr-x  11 user  staff  352 Nov 27 12:11 ../
drwxr-xr-x  10 user  staff  320 Nov 22  2023 3.1.4/
drwxr-xr-x   2 user  staff   64 Nov 27 12:11 3.3.6/

mv 3.3.6 /tmp

ls -al
total 0
drwxr-xr-x   3 user  staff   96 Nov 27 12:42 ./
drwxr-xr-x  11 user  staff  352 Nov 27 12:11 ../
drwxr-xr-x  10 user  staff  320 Nov 22  2023 3.1.4/

vagrant plugin install vagrant-google --plugin-version "2.7.0" 
Installing the 'vagrant-google --version '2.7.0'' plugin. This can take a few minutes...
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 google-cloud-env (~> 2.1) and google-cloud-env (~> 1.2)
  Activated google-cloud-env-1.6.0
  which does not match conflicting dependency (~> 2.1)

  Conflicting dependency chains:
    vagrant-google (= 2.7.0), 2.7.0 activated, depends on
    fog-google (~> 1.17.0), 1.17.0 activated, depends on
    google-cloud-env (~> 1.2), 1.6.0 activated

  versus:
    vagrant-google (= 2.7.0), 2.7.0 activated, depends on
    fog-google (~> 1.17.0), 1.17.0 activated, depends on
    google-apis-compute_v1 (~> 0.14), 0.86.0 activated, depends on
    google-apis-core (< 2.a, >= 0.11.0), 0.11.3 activated, depends on
    googleauth (< 2.a, >= 0.16.2), 1.11.2 activated, depends on
    google-cloud-env (~> 2.1)


ls -al
total 0
drwxr-xr-x   4 user  staff  128 Nov 27 12:42 ./
drwxr-xr-x  11 user  staff  352 Nov 27 12:42 ../
drwxr-xr-x  10 user  staff  320 Nov 22  2023 3.1.4/
drwxr-xr-x   2 user  staff   64 Nov 27 12:42 3.3.6/

ls -al 3.3.6
total 0
drwxr-xr-x  2 user  staff   64 Nov 27 12:42 ./
drwxr-xr-x  4 user  staff  128 Nov 27 12:42 ../

@ElijahLynn
Copy link
Author

ElijahLynn commented Nov 27, 2024

full uninstall/reinstall commands, plus nuked ~/.vagrant.d

brew uninstall vagrant
==> Uninstalling Cask vagrant
==> Running uninstall script uninstall.tool
The following files and directories will be removed:
    /opt/vagrant
    /usr/local/bin/vagrant

Do you wish to uninstall Vagrant (Yes/No)?
The uninstallation process requires administrative privileges
because some of the installed files cannot be removed by a
normal user. You may now be prompted for a password...


Successfully uninstalled Vagrant.
Done.
Press any key to exit.
==> Uninstalling packages with sudo; the password may be necessary:
com.vagrant.vagrant
==> Purging files for version 2.4.3 of Cask vagrant

vagrant
fish: Unknown command: vagrant

rm -rf ~/.vagrant.d

brew install vagrant
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################################################################## 100.0%
==> Downloading https://releases.hashicorp.com/vagrant/2.4.3/vagrant_2.4.3_darwin_arm64.dmg
Already downloaded: /Users/user/Library/Caches/Homebrew/downloads/de581766ec129fdc62863bee76b570cf809ff2a53b6e59f0ec2feb6a7408dc9d--vagrant_2.4.3_darwin_arm64.dmg
==> Installing Cask vagrant
==> Running installer for vagrant with sudo; the password may be necessary.
installer: Package name is Vagrant
installer: Installing at base path /
installer: The install was successful.
🍺  vagrant was successfully installed!

which vagrant
/usr/local/bin/vagrant

vagrant --version
Vagrant 2.4.3

vagrant plugin install vagrant-google --plugin-version "2.7.0" 
Installing the 'vagrant-google --version '2.7.0'' plugin. This can take a few minutes...
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 google-cloud-env (~> 2.1) and google-cloud-env (~> 1.2)
  Activated google-cloud-env-1.6.0
  which does not match conflicting dependency (~> 2.1)

  Conflicting dependency chains:
    vagrant-google (= 2.7.0), 2.7.0 activated, depends on
    fog-google (~> 1.17.0), 1.17.0 activated, depends on
    google-cloud-env (~> 1.2), 1.6.0 activated

  versus:
    vagrant-google (= 2.7.0), 2.7.0 activated, depends on
    fog-google (~> 1.17.0), 1.17.0 activated, depends on
    google-apis-compute_v1 (~> 0.14), 0.86.0 activated, depends on
    google-apis-core (< 2.a, >= 0.11.0), 0.11.3 activated, depends on
    googleauth (< 2.a, >= 0.16.2), 1.11.2 activated, depends on
    google-cloud-env (~> 2.1)


@ElijahLynn
Copy link
Author

ElijahLynn commented Nov 27, 2024

@ElijahLynn
Copy link
Author

ElijahLynn commented Nov 27, 2024

ultimately, seems like a real issue to me. Here is what I see:

vagrant-google 2.7.0:
https://github.com/mitchellh/vagrant-google/blob/v2.7.0/vagrant-google.gemspec#L31

s.add_runtime_dependency "fog-google", "~> 1.17.0"

fog-google 1.17.0:
https://github.com/fog/fog-google/blob/v1.17.0/fog-google.gemspec#L36

spec.add_dependency "google-cloud-env", ">= 1.2", "< 3.0"

but ALSO has a dependency on google-apis-compute_v1
https://github.com/fog/fog-google/blob/v1.17.0/fog-google.gemspec#L30

spec.add_dependency "google-apis-compute_v1", "~> 0.14"

which > ultimately resolves to googleauth:
https://github.com/googleapis/google-auth-library-ruby/blob/googleauth/v1.11.2/googleauth.gemspec#L26

gem.add_dependency "google-cloud-env", "~> 2.1"

There are two dependency resolutions in the chain above, which cause the conflict:

  1. spec.add_dependency "google-cloud-env", ">= 1.2", "< 3.0"
  2. gem.add_dependency "google-cloud-env", "~> 2.1"

Now, fog-google did release 1.24.0 which does update this from only letting the patch version be updated to letting anything above 1.2 be allowed.

https://github.com/fog/fog-google/blob/master/CHANGELOG.md?plain=1#L39
1.24.0 changelog

  • #619 Updated google-cloud-env requirement from ~> 1.2 to >= 1.2, < 3.0 [dependabot]

I made a PR here to bump it: #272. But, also ran into OTHER dependency errors when building it... 🙁

I'm just confused how this worked for anyone else. And the fact there are no other reports, suggests to me that this is not a real issue. Now, I do see that only 2.6.0 has been released, and maybe that is an indication of something... But it is also odd that my colleague has 2.7.0 installed and it is working fine for them:

working on my colleagues Mac:

vagrant plugin list
==> vagrant: A new version of Vagrant is available: 2.4.3 (installed version: 2.3.6)!
==> vagrant: To upgrade visit: https://www.vagrantup.com/downloads.html

vagrant-google (2.7.0, global)

I even downgraded to 2.3.6 as well. And I installed rbenv and tried matching their version of Ruby, even though from my understanding vagrant uses and embedded version of Ruby.

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

No branches or pull requests

1 participant