fresh install: Installing the 'vagrant-google --version '2.7.0'' plugin... conflicting dependencies google-cloud-env (~> 2.1) and google-cloud-env (~> 1.2)
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)
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/
PR that I am tinkering with here to:
- https://github.com/mitchellh/vagrant-google/pull/272
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 ../
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)
related:
- https://github.com/mitchellh/vagrant-google/issues/253
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:
-
spec.add_dependency "google-cloud-env", ">= 1.2", "< 3.0" -
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: https://github.com/mitchellh/vagrant-google/pull/272. But, also ran into OTHER dependency errors when building it... :slightly_frowning_face:
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.
I'm having this issue as well. You can see that vagrant is by default installing an extremely old version of the plugin, and updating doesn't fix it:
% vagrant --version
Vagrant 2.4.3
% vagrant plugin install vagrant-google
Installing the 'vagrant-google' plugin. This can take a few minutes...
Fetching uuidtools-2.2.0.gem
Fetching public_suffix-6.0.1.gem
Fetching addressable-2.8.7.gem
Fetching signet-0.19.0.gem
Fetching retriable-3.1.2.gem
Fetching launchy-2.5.2.gem
Fetching extlib-0.9.16.gem
Fetching autoparse-0.3.3.gem
Fetching google-api-client-0.7.1.gem
Fetching racc-1.8.1.gem
Building native extensions. This could take a while...
Fetching nokogiri-1.18.1-arm64-darwin.gem
Fetching formatador-1.1.0.gem
Fetching fog-core-2.6.0.gem
Fetching fog-xml-0.1.5.gem
Fetching fog-json-1.2.0.gem
Fetching fog-google-0.2.0.gem
Fetching vagrant-google-0.2.4.gem
**Installed the plugin 'vagrant-google (0.2.4)'!**
% vagrant plugin update
Updating installed plugins...
Building native extensions. This could take a while...
All plugins are up to date.
% vagrant plugin list
**vagrant-google (0.2.4, global)**
- Version Constraint: > 0
Newer version of the plugin are found in the repo:
% gem search vagrant-google --remote
*** REMOTE GEMS ***
tcr-vagrant-google (0.1.4)
vagrant-google (2.7.0)
but when I try to install them, I get an error:
% 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)
Any help would be great!
Thanks for sharing your experience @kevinfealey too! fwiw, I sadly was not able to get past this block, so I cannot give you any further guidance. Best of luck, and I'll be watching this thread for any further progress.
Thanks @ElijahLynn - I just tried:
- Fresh install on a Mac 15.2
- Fresh install on Windows 11
- Fresh install on Ubuntu
- Downgrading Vagrant to 2.2.16
- Downgrading vagrant-google to various previous versions
- Installing Ruby 3.4.0
None of the above fixed my issues as no matter what, I ran into this or other dependency conflicts. I'm ditching Vagrant for my current use case (which had been working for the past 18 months), and will have to start from scratch with something else. Good luck to anyone else who runs into this - it's infuriating!
I had the same problem as you guys, and downgrading from Vagrant 2.4.3 to 2.4.1 worked for me on Mac M1. Here is my stuff:
ruby -v
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin24]
gem -v
3.6.3
vagrant -v
Vagrant 2.4.1
vagrant plugin list
vagrant-google (2.7.0, global)
OMG - It worked (Mac M2, Sonoma 14.5)!!! Thank you so much @pontello!!!
First update ruby from 2.6 to back to 3.x (3.4.1) - using rbenv (brew install rbenv).
ruby -v
ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23]
rbenv install 3.4.1
ruby-build: using openssl@3 from homebrew
==> Downloading ruby-3.4.1.tar.gz...
-> curl -q -fL -o ruby-3.4.1.tar.gz https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.1.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 22.0M 100 22.0M 0 0 52.3M 0 --:--:-- --:--:-- --:--:-- 52.4M
==> Installing ruby-3.4.1...
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew
-> ./configure "--prefix=$HOME/.rbenv/versions/3.4.1" --with-openssl-dir=/opt/homebrew/opt/openssl@3 --enable-shared --with-libyaml-dir=/opt/homebrew/opt/libyaml --with-gmp-dir=/opt/homebrew/opt/gmp --with-ext=openssl,psych,+
-> make -j 12
-> make install
==> Installed ruby-3.4.1 to /Users/user/.rbenv/versions/3.4.1
rbenv global 3.4.1
ruby -v
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin23]
gem -v
3.6.2
Then downgrade Vagrant from 2.4.3 to 2.4.1 and install vagrant-google 2.7.0...
vagrant -v
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)
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
curl --location --output vagrant_2.4.1 https://releases.hashicorp.com/vagrant/2.4.1/vagrant_2.4.1_darwin_amd64.dmg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 127M 100 127M 0 0 55.0M 0 0:00:02 0:00:02 --:--:-- 55.0M
ls -al vagrant_2.4.1
-rw-r--r-- 1 user staff 133265277 Feb 11 09:16 vagrant_2.4.1
sudo hdiutil attach vagrant_2.4.1
Checksumming Protective Master Boot Record (MBR : 0)…
Protective Master Boot Record (MBR :: verified CRC32 $D94FDBE0
Checksumming GPT Header (Primary GPT Header : 1)…
GPT Header (Primary GPT Header : 1): verified CRC32 $E3A10F09
Checksumming GPT Partition Data (Primary GPT Table : 2)…
GPT Partition Data (Primary GPT Tabl: verified CRC32 $9CB23802
Checksumming (Apple_Free : 3)…
(Apple_Free : 3): verified CRC32 $00000000
Checksumming disk image (Apple_HFS : 4)…
.................................................................................................................................................................
disk image (Apple_HFS : 4): verified CRC32 $8D0F0C1B
Checksumming (Apple_Free : 5)…
(Apple_Free : 5): verified CRC32 $00000000
Checksumming GPT Partition Data (Backup GPT Table : 6)…
GPT Partition Data (Backup GPT Table: verified CRC32 $9CB23802
Checksumming GPT Header (Backup GPT Header : 7)…
GPT Header (Backup GPT Header : 7): verified CRC32 $A0984F59
verified CRC32 $94867E0D
/dev/disk4 GUID_partition_scheme
/dev/disk4s1 Apple_HFS /Volumes/Vagrant
sudo installer -pkg /Volumes/Vagrant/vagrant.pkg -target /
installer: Package name is Vagrant
installer: Installing at base path /
installer: The install was successful.
vagrant --version
Vagrant 2.4.1
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...
Fetching faraday-net_http-3.3.0.gem
Fetching faraday-2.12.2.gem
Fetching google-cloud-env-1.6.0.gem
Fetching retriable-3.1.2.gem
Fetching uber-0.1.0.gem
Fetching trailblazer-option-0.1.2.gem
Fetching declarative-0.0.20.gem
Fetching representable-3.2.0.gem
Fetching mini_mime-1.1.5.gem
Fetching jwt-2.10.1.gem
Fetching public_suffix-6.0.1.gem
Fetching addressable-2.8.7.gem
Fetching signet-0.19.0.gem
Fetching os-1.1.4.gem
Fetching googleauth-1.8.1.gem
Fetching google-apis-core-0.11.3.gem
Fetching google-apis-storage_v1-0.32.0.gem
Fetching google-apis-sqladmin_v1beta4-0.61.0.gem
Fetching google-apis-pubsub_v1-0.45.0.gem
Fetching google-apis-monitoring_v3-0.54.0.gem
Fetching google-apis-iamcredentials_v1-0.17.0.gem
Fetching google-apis-dns_v1-0.36.0.gem
Fetching google-apis-compute_v1-0.86.0.gem
Fetching nokogiri-1.18.2-arm64-darwin.gem
Fetching formatador-0.3.0.gem
Fetching fog-core-2.1.0.gem
Fetching fog-xml-0.1.5.gem
Fetching fog-json-1.2.0.gem
Fetching fog-google-1.17.0.gem
Fetching vagrant-google-2.7.0.gem
Installed the plugin 'vagrant-google (2.7.0)'!
vagrant plugin list
vagrant-google (2.7.0, global)
- Version Constraint: 2.7.0
sudo hdiutil detach /Volumes/Vagrant/
"disk4" ejected.
rm vagrant_2.4.1
I uninstalled vagrant and then did this:
wget https://raw.githubusercontent.com/Homebrew/homebrew-cask/3fcf62641e6594340a09fda1cf1bfb3be505cf0c/Casks/v/vagrant.rb
brew install --cask vagrant.rb
vagrant plugin install vagrant-google
That installed the right version of vagrant and the plugin version is correct now too.
❯ vagrant plugin list
vagrant-google (2.7.0, global)
Proper fix for the new versions https://github.com/mitchellh/vagrant-google/pull/273