"Command not invoked properly" Setting up laravel homestead with Vagrant - laravel

I am trying to set up a a vagrant laravel homestead box. I have both vagrant and virtualbox installed on my Xubuntu 14.04 machine. To do this I'm running the following command
user#home: $ vagrant box add laravel/homestead
Then I get the following error
This command was not invoked properly. The help for this command is
available below.
Usage: vagrant box add <name> <url> [--provider provider] [-h]
I'm doing this exactly how the laravel and vagrant documentation shows. Why is this not working? Do I need a url?

Your syntax is correct for versions 1.5+.
If you older Vagrant you need go to https://vagrantcloud.com/<BOX_NAME>/versions and copy the full link to the latest active version of you box. (<BOX_NAME> in your case is laravel/homestead)
Then you can download like this:
vagrant box add 'laravel/homestead' https://vagrantcloud.com/laravel/homestead/version/9/provider/virtualbox.box --provider virtualbox
However I strongly advice to update your Vagrant for the latest one.

Related

Laravel Homestead/Vagrant box error : The specified checksum type is not supported by Vagrant: sha512

I am trying to install laravel homestead and can't get past adding the homestead box.
The instruction is: vagrant box add laravel/homestead
After completing the download process following error appears.
C:\Users\HARSHA - PC PRO>vagrant box add laravel/homestead
==> box: Loading metadata for box 'laravel/homestead'
box: URL: https://vagrantcloud.com/laravel/homestead
==> box: Adding box 'laravel/homestead' (v9.0.1) for provider: virtualbox
box: Downloading: https://vagrantcloud.com/laravel/boxes/homestead/versions/9.0.1/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
box: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
box: Progress: 100% (Rate: 188k/s, Estimated time remaining: --:--:--)
box: Calculating and comparing box checksum...
The specified checksum type is not supported by Vagrant: sha512.
Vagrant supports the following checksum types:
md5, sha1, sha256
I'm on Windows 10 64 bit PC and have tried these instructions with the virtualbox(Version 6.0.0 r127566 (Qt5.6.2)) and vagrant_2.2.2_x86_64 version.
I'm trying to install Laravel homestead and am not aware of resolving this since I am new to the Laravel vagrant. I searched the web for the particular problem and I could not find any solution pertaining to the above, so any help is appreciated.
As mentioned in Vagrant's CHANGELOG.md file, new checksum types are now supported. Simply updating Vagrant to its latest version (2.2.6) should do the trick.
You can then do vagrant box update to upgrade the Homestead box.
In my case I saw in the logs that the version trying to get installed was v9.2.2-alpha1
box: Adding box 'laravel/homestead' (v9.2.2-alpha1) for provider:
virtualbox
What worked for me is defining the version by using the following parameter
--box-version=9.1.1
i.e.
vagrant box add laravel/homestead --checksum-type=sha256 --box-version=9.1.1
Also, try to download and install the latest version of vagrant.
You are using the unsupported checksum type.try installing with --checksum-type parameter. Given below,
vagrant box add laravel/homestead --checksum-type sha256
Here is the Docs to refer to while using command-line.
Try 2.2.7 version.
vagrant -v
Vagrant 2.2.7
==> box: Successfully added box 'laravel/homestead' (v9.3.0) for 'virtualbox'!
I had the same problem and it took multiple attempts.
Problems
Couldn't update the vagrant box.
Once I downloaded it wouldn't switch to the new box.
Once I switched Laravel threw a Facade error.
Solution
(with many thank you's to the answers in this thread):
Navigate to the Homestead/Vagrant folder.
Then run "vagrant -v" to check your Vagrant version (ex. "Vagrant 2.1.5").
In a web browser go to https://www.vagrantup.com/downloads.html .
Download the latest Vagrant version.
On your computer, run and install the new version.
Go to: https://www.virtualbox.org/
Download the lastest Virtual Machine.
On your computer, run and install the new version.
Back in the terminal, check the vagrant version again "vagrant -v" (ex. "Vagrant 2.2.10").
Make sure your Vagrant is stopped by running "vagrant halt".
Purge and reinstall your vagrant plugins to be safe with "vagrant plugin expunge --reinstall" (and confirm "Y").
Now run "vagrant box update" to update your box.
Now load your box with "vagrant up".
With your box loaded run "vagrant destroy".
Now run "vagrant up" again to rebuild your box from scratch.
This worked for me. Let me know if this works for you.

What is the url to the ubuntu/xenial64 box url for vagrant?

Where to find the url for the ubuntu/xenial64.box?
I only see version-info at https://app.vagrantup.com/ubuntu/boxes/xenial64. But what is the url for the box download?
I simply do:
$ vagrant init ubuntu/xenial64
$ vagrant up
But get:
The box 'ubuntu/xenial64' could not be found.
So I guess I need to put something in config.vm.box_url, but what?
If you keep clicking around and following the links on the Vagrant Cloud website, then eventually you find that the box is hosted at http://cloud-images.ubuntu.com
From there, you can find the latest version of the xenial box specifically hosted at:
http://cloud-images.ubuntu.com/xenial/current/
Direct link to Vagrant box: http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box
Sorry, was version mismatch. Newer vagrant works just fine.
I had Vagrant 1.4.x (on linux mint 17.1) and virtualbox 5. Online boxes were not found. Now I have Vagrant 1.8.1 (on linux mint 18.2) and virtualbox 5 and everything works as expected from the Vagrant manual (no url needed).
Thanks and sorry for waisting your time..
--
Oscar.

Vagrant box add fail

I was trying to add
laravel/homestead
box in vagrant but i get different errors.
By running
vagrant box add laravel/homestead
I get this error
The box 'laravel/homestead' could not be found or could not be accessed in the remote catalog. If this is a private box on HashiCorp's Atlas, please verify you're logged in via `vagrant login`. Also, please double-check the name. The expanded URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/laravel/homestead"] Error:
I tried to 'vagrant login' and i logged in successfully but still receiving same error.
I tried to download the box manually, However, I still having problems adding it.
by running this command
vagrant box add laravel/homestead [Path in Windows]
i get
==> box: Adding box 'laravel/homestead' (v0) for provider:
box: Unpacking necessary files from: file://C:/Users/eNull/Downloads/hc-download
box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
My OS: Windows 10.
cUrl version: curl 7.45.0 (x86_64-w64-mingw32) libcurl/7.45.0 OpenSSL/1.0.2d zlib/1.2.8 libidn/1.32 libssh2/1.6.0 librtmp/2.3
vagrant: 1.8.1
VirtualBox: 5.0.12
You don`t need to add the box from web. Init instead of this:
vagrant init laravel/homestead
vagrant up
vagrant ssh
Vagrant should add homestead in boxes list automatically.
If you want to set up local downloaded box, you will be get better to add box directly from box directory.:
cd [path in windows]
vagrant box add [name_box] laravel/homestead
vagrant up
vagrant ssh
Fixed.
I downloaded
cUrl x64 with SSL
and replace it with the curl.exe provided by Vagrant.
In other words, I copied the curl.exe to
C:\HashiCorp\Vagrant\embedded\bin
Now it's working perfect.
vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead
use chocolate down cUrl,and replace it with the curl.exe provided by Vagrant. then it works.
I find error by script: vagrant box add {box path} --debug

vagrant, install chef/centos-6.6

My vagrant version is:
$ vagrant --version
Vagrant version 1.0.1
Following these instructions, vagrant init works:
$ vagrant init chef/centos-6.6
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
But vagrant up can't find the box:
$ vagrant up
There was a problem with the configuration of Vagrant. The error message(s)
are printed below:
vm:
* The box 'chef/centos-6.6' could not be found.
What is the way to configure vagrant, or the command line option, to use chef/centos-6.6?
Chef has removed all of their boxes from atlas. They have left a comment here https://atlas.hashicorp.com/chef/ saying:
If you are looking for Bento boxes they now have their own
organization https://atlas.hashicorp.com/bento/
If you trigger a:
vagrant box add chef/centos-6.6
with the outdated source (chef) it will provide feedback leading to bento as the new source, something along the lines of:
Name: bento/centos-6.6
Provider: virtualbox
Version: 2.2.0
This eventually makes more concrete what is written on the site at the chef atlas link, that the command in your question shall now instead be:
$ vagrant init bento/centos-6.6
(replacing chef by bento)
Some time ago hashicorp moved their images to atlas. Boxes are now downloaded here:
https://atlas.hashicorp.com/boxes/search
Your box is here:
https://atlas.hashicorp.com/chef/boxes/centos-6.6
I can download the box with Vagrant 1.7.2. You are using 1.0.1.
So i think it's a version issue. You have to install a newer version.

Error when Vagrant Up running?

I am using vagrant on Ubuntu 14.04 and the version of it is Vagrant 1.4.3. When I am tiring to up the vagrant, Its giving me following error every time.
Successfully added box 'precise64' with provider 'virtualbox'!
There are errors in the configuration of this machine. Please fix
the following errors and try again:
shell provisioner:
* The following settings shouldn't exist: run
My virtualbox version = 4.3.10_Ubuntur93012
Please help me on this its blocking my every workflow :(
Install the latest version of Vagrant on your Ubuntu machine (assuming 64-bit):
Remove your old version of Vagrant: sudo apt-get remove vagrant
Copy the Debian 64-bit download link from https://www.vagrantup.com/downloads.html
In your console, type wget, paste in the download link from step 2, and hit enter (should look like wget https://releases.hashicorp.com/vagrant/x.x.x/vagrant_x.x.x_x86_64.deb)
Enter sudo dpkg -i vagrant_x.x.x_x86_64.deb, where x.x.x is the current Vagrant version
Credits:
https://www.howtoforge.com/tutorial/ubuntu-vagrant-install-and-getting-started/
http://www.icchasethi.com/installing-latest-vagrant-and-virtualbox-version-on-ubuntu-12-01/

Resources