laravel / homestead

MIT License
3.85k stars 1.45k forks source link

Constraint Issues with laravel/homestead #1934

Closed Speedy059 closed 5 months ago

Speedy059 commented 5 months ago

Vagrant Version: 2.4.0 Virtualization: virtualbox

I followed the official documentation of setting up a new laravel/homestead and once I run vagrant up it provides me this error:

D:\Homestead(release -> origin)
λ vagrant up
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Box 'laravel/homestead' could not be found. Attempting to find and install...
    homestead: Box Provider: virtualbox
    homestead: Box Version: >= 14.0.2, < 15.0.0
==> homestead: Loading metadata for box 'laravel/homestead'
    homestead: URL: https://vagrantcloud.com/api/v2/vagrant/laravel/homestead
The box you're attempting to add has no available version that
matches the constraints you requested. Please double-check your
settings. Also verify that if you specified version constraints,
that the provider you wish to use is available for these constraints.

Box: laravel/homestead
Address: https://vagrantcloud.com/api/v2/vagrant/laravel/homestead
Constraints: >= 14.0.2, < 15.0.0
Available versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.3.0, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 1.0.0, 1.0.1, 1.1.0, 2.0.0, 2.1.0, 2.2.0, 3.0.0, 3.1.0, 4.0.0, 5.0.1, 5.1.0, 5.2.0, 6.0.0, 6.1.0, 6.2.0, 6.3.0, 6.4.0, 7.0.0, 7.1.0, 7.2.1, 8.0.0.pre.alpha1, 8.0.0.pre.alpha2, 8.0.0.pre.alpha3, 8.0.0.pre.alpha4, 8.0.0.pre.beta, 8.0.0, 8.0.1, 8.1.0, 8.2.0, 8.2.1, 9.0.0, 9.0.1, 9.1.0, 9.1.1, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.5.1, 9.6.0, 9.6.1, 9.7.2, 10.0.0, 10.1.0, 10.1.1, 11.0.0, 11.1.0, 11.3.0, 11.4.0, 11.5.0, 12.0.0, 12.1.0, 12.2.0, 13.0.0, 14.0.0, 14.0.1, 14.0.2

Any idea how to resolve this? I noticed the exact time I destroyed my older box, v15 was JUST released and not sure if this has something to do with it. I tried deleting my entire Homestead folder and starting over with the git clone, but to no avail.

Homestead.yaml

ip: "192.168.56.56"
memory: 8192
cpus: 8
provider: virtualbox

authorize: C:\Users\{EDITED}\.ssh\id_rsa.pub

keys:
    - C:\Users\{EDITED}\.ssh\id_rsa

folders:
    - map: d:\projects
      to: /home/vagrant/code

sites:
    - map: login.kbo.local
      to: /home/vagrant/code/AuthApplication/public
      php: "8.3"
    - map: login.kbo.com
      to: /home/vagrant/code/AuthApplication/public
      php: "8.3"
    - map: tm.kbo.local
      to: /home/vagrant/code/TeacherManager/public
      php: "8.3"

databases:
    - homestead

features:
    - mariadb: false
    - postgresql: false
    - ohmyzsh: false
    - webdriver: false

services:
    - enabled:
          - "mysql"
#    - disabled:
#        - "postgresql@11-main"

#ports:
#    - send: 33060 # MySQL/MariaDB
#      to: 3306
#    - send: 4040
#      to: 4040
#    - send: 54320 # PostgreSQL
#      to: 5432
#    - send: 8025 # Mailpit
#      to: 8025
#    - send: 9600
#      to: 9600
#    - send: 27017
#      to: 27017
browner12 commented 5 months ago

That's very weird. In your "available versions" it literally lists 14.0.2, which is inside your constraints. Any luck waiting a bit?

browner12 commented 5 months ago

Also to confirm, since I'm so far removed from Windows world, this is an x86 machine, right?

(do they even make ARM for Windows?)

lloricode commented 5 months ago

+1

Sn0wCrack commented 5 months ago

Ran into a similar issue on macOS 14 where it kept saying that laravel/homestead 13.0.0 was the latest box version.

I ran the following command and it successfully downloaded the latest version of the box:

vagrant box add --box-version 14.0.2 --provider virtualbox laravel/homestead

If you exclude the "provider" option it should prompt you for which one to download.

svpernova09 commented 5 months ago

I wonder if this is weird edge caching of app.vagrant.com? My test setup is an M1 mac mini and a System76 laptop and neither had this issue.

Sn0wCrack commented 5 months ago

I wonder if this is weird edge caching of app.vagrant.com? My test setup is an M1 mac mini and a System76 laptop and neither had this issue.

I'd wager it's something similar to this, a colleague of mine attempted to run vagrant box add laravel/homestead without specifiyng the box version and it mentioned that v12.2.0 was the latest version of the box, but doing a vagrant box update it mentioned v13.0.0.

TimodeWinter-tdw commented 5 months ago

Ran into a similar issue on macOS 14 where it kept saying that laravel/homestead 13.0.0 was the latest box version.

I ran the following command and it successfully downloaded the latest version of the box:

vagrant box add --box-version 14.0.2 --provider virtualbox laravel/homestead

If you exclude the "provider" option it should prompt you for which one to download.

Even when I run that command I still can't download it:

==> box: Loading metadata for box 'laravel/homestead'
    box: URL: https://vagrantcloud.com/api/v2/vagrant/laravel/homestead
The box you're attempting to add has no available version that
matches the constraints you requested. Please double-check your
settings. Also verify that if you specified version constraints,
that the provider you wish to use is available for these constraints.

Box: laravel/homestead
Address: https://vagrantcloud.com/api/v2/vagrant/laravel/homestead
Constraints: 14.0.2
Available versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.3.0, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 1.0.0, 1.0.1, 1.1.0, 2.0.0, 2.1.0, 2.2.0, 3.0.0, 3.1.0, 4.0.0, 5.0.1, 5.1.0, 5.2.0, 6.0.0, 6.1.0, 6.2.0, 6.3.0, 6.4.0, 7.0.0, 7.1.0, 7.2.1, 8.0.0.pre.alpha1, 8.0.0.pre.alpha2, 8.0.0.pre.alpha3, 8.0.0.pre.alpha4, 8.0.0.pre.beta, 8.0.0, 8.0.1, 8.1.0, 8.2.0, 8.2.1, 9.0.0, 9.0.1, 9.1.0, 9.1.1, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.5.1, 9.6.0, 9.6.1, 9.7.2, 10.0.0, 10.1.0, 10.1.1, 11.0.0, 11.1.0, 11.3.0, 11.4.0, 11.5.0, 12.0.0, 12.1.0, 12.2.0, 13.0.0, 14.0.0, 14.0.1, 14.0.2
Sn0wCrack commented 5 months ago

Ran into a similar issue on macOS 14 where it kept saying that laravel/homestead 13.0.0 was the latest box version. I ran the following command and it successfully downloaded the latest version of the box:

vagrant box add --box-version 14.0.2 --provider virtualbox laravel/homestead

If you exclude the "provider" option it should prompt you for which one to download.

Even when I run that command I still can't download it:

==> box: Loading metadata for box 'laravel/homestead'
    box: URL: https://vagrantcloud.com/api/v2/vagrant/laravel/homestead
The box you're attempting to add has no available version that
matches the constraints you requested. Please double-check your
settings. Also verify that if you specified version constraints,
that the provider you wish to use is available for these constraints.

Box: laravel/homestead
Address: https://vagrantcloud.com/api/v2/vagrant/laravel/homestead
Constraints: 14.0.2
Available versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.3.0, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 1.0.0, 1.0.1, 1.1.0, 2.0.0, 2.1.0, 2.2.0, 3.0.0, 3.1.0, 4.0.0, 5.0.1, 5.1.0, 5.2.0, 6.0.0, 6.1.0, 6.2.0, 6.3.0, 6.4.0, 7.0.0, 7.1.0, 7.2.1, 8.0.0.pre.alpha1, 8.0.0.pre.alpha2, 8.0.0.pre.alpha3, 8.0.0.pre.alpha4, 8.0.0.pre.beta, 8.0.0, 8.0.1, 8.1.0, 8.2.0, 8.2.1, 9.0.0, 9.0.1, 9.1.0, 9.1.1, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.5.1, 9.6.0, 9.6.1, 9.7.2, 10.0.0, 10.1.0, 10.1.1, 11.0.0, 11.1.0, 11.3.0, 11.4.0, 11.5.0, 12.0.0, 12.1.0, 12.2.0, 13.0.0, 14.0.0, 14.0.1, 14.0.2

Out of curiosity what version of Vagrant do you have? In both cases we were using Vagrant 2.4.1. You should be able to find out by running vagrant --version

TimodeWinter-tdw commented 5 months ago

Ran into a similar issue on macOS 14 where it kept saying that laravel/homestead 13.0.0 was the latest box version. I ran the following command and it successfully downloaded the latest version of the box:

vagrant box add --box-version 14.0.2 --provider virtualbox laravel/homestead

If you exclude the "provider" option it should prompt you for which one to download.

Even when I run that command I still can't download it:

==> box: Loading metadata for box 'laravel/homestead'
    box: URL: https://vagrantcloud.com/api/v2/vagrant/laravel/homestead
The box you're attempting to add has no available version that
matches the constraints you requested. Please double-check your
settings. Also verify that if you specified version constraints,
that the provider you wish to use is available for these constraints.

Box: laravel/homestead
Address: https://vagrantcloud.com/api/v2/vagrant/laravel/homestead
Constraints: 14.0.2
Available versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.3.0, 0.3.3, 0.4.0, 0.4.1, 0.4.2, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 1.0.0, 1.0.1, 1.1.0, 2.0.0, 2.1.0, 2.2.0, 3.0.0, 3.1.0, 4.0.0, 5.0.1, 5.1.0, 5.2.0, 6.0.0, 6.1.0, 6.2.0, 6.3.0, 6.4.0, 7.0.0, 7.1.0, 7.2.1, 8.0.0.pre.alpha1, 8.0.0.pre.alpha2, 8.0.0.pre.alpha3, 8.0.0.pre.alpha4, 8.0.0.pre.beta, 8.0.0, 8.0.1, 8.1.0, 8.2.0, 8.2.1, 9.0.0, 9.0.1, 9.1.0, 9.1.1, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.5.1, 9.6.0, 9.6.1, 9.7.2, 10.0.0, 10.1.0, 10.1.1, 11.0.0, 11.1.0, 11.3.0, 11.4.0, 11.5.0, 12.0.0, 12.1.0, 12.2.0, 13.0.0, 14.0.0, 14.0.1, 14.0.2

Out of curiosity what version of Vagrant do you have? In both cases we were using Vagrant 2.4.1. You should be able to find out by running vagrant --version

Yeah I was running an older version of vagrant I just found out. I updated to the latest version of vagrant and also installed virtualbox 7.0.14. Now I can just run vagrant box update and it just downloaded 14.0.2 without having to explicitly set the version.

I'm not entirely sure if it is now working as expected due to the vagrant update or the virtualbox update as I ran them at the same time. In any case, when downloading the latest version of both it seems to be working as expected.

Sn0wCrack commented 5 months ago

Yeah I was running an older version of vagrant I just found out. I updated to the latest version of vagrant and also installed virtualbox 7.0.14. Now I can just run vagrant box update and it just downloaded 14.0.2 without having to explicitly set the version.

I'm not entirely sure if it is now working as expected due to the vagrant update or the virtualbox update as I ran them at the same time. In any case, when downloading the latest version of both it seems to be working as expected.

I would say that's related to the Vagrant version. Recently Hashicorp added the ability to tag releases with a specific CPU architecture and Homesteaed / Settler make use of that in the last few box releases, so it may not have understand how to grab the latest versions.

TimodeWinter-tdw commented 5 months ago

I would say that's related to the Vagrant version. Recently Hashicorp added the ability to tag releases with a specific CPU architecture and Homesteaed / Settler make use of that in the last few box releases, so it may not have understand how to grab the latest versions.

Yeah I presume so! Well it's working now, so for anyone else that has issues I would advise to just upgrade vagrant. Thanks @Sn0wCrack!

svpernova09 commented 5 months ago

We should be enforcing Vagrant >= 2.4.0. 🤔 Glad you sorted it out.

TimodeWinter-tdw commented 1 month ago

I just made another discovery when I had this issue again on another device: It is not only that you need vagrant >= 2.4.0, but on windows you specifically need the AMD64 build of vagrant.

I tried vagrant v2.4.1 with the I686 build, but that can only install up to v13 of the homestead box. When reinstalling vagrant with the AMD64 build it could download v14.0.4 of the homestead box.

Just mentioning it as other people might be having trouble with this.