Can't install laravel homestead - laravel

I'm trying to get laravel set up on my Windows 8.1, but keep running into errors. Can anyone advise what's going wrong here and how I can sort it? I have vagrant and virtualbox setup as required. Thanks.
C:\Users\Robin>vagrant box add laravel/homestead
==> box: Loading metadata for box 'laravel/homestead'
box: URL: https://atlas.hashicorp.com/laravel/homestead
==> box: Adding box 'laravel/homestead' (v0.2.2) for provider: virtualbox
box: Downloading:
https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.2.2/providers/virtualbox.box
box: Progress: 100% (Rate: 582k/s, Estimated time remaining: --:--:--)
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):
x ./box-disk1.vmdk: Write failed
x ./box.ovf: Write failed
x ./Vagrantfile: Can't create '\\\\?\\C:\\Users\\Robin\\.vagrant.d\\tmp\\vagrant-box-add-temp-
20150112-14824-106nj0l\\Vagrantfile'
bsdtar.EXE: Error exit delayed from previous errors.

For me the problem was that the download of the box was not successful completely, but the file was "corrupt". You can retry the command multiple times, because vagrant resumes the download from previous failed download:
vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead

try this command :
vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead
please tell me if it worked or i'll delete it (i'm not able to comment)

Related

Vagrant is failing to unpackage Ubuntu Bionic box

I've tried the following on two different hosts (MacOS and Windows 10):
vagrant init ubuntu/bionic64
vagrant up
However on both machines I get the same error:
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'bionic' (v0) for provider:
box: Unpacking necessary files from: file:///Users/user/Downloads/bionic-server-cloudimg-amd64-vagrant.box
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):
x box.ovf
x Vagrantfile
x metadata.json
x ubuntu-bionic-18.04-cloudimg.mf
x ubuntu-bionic-18.04-cloudimg.vmdk: Truncated tar archive
bsdtar: Error exit delayed from previous errors.
So far, I've tried:
freeing up 20GB of disk space
downloading the box and manually untarring it
using older versions of this vagrant box from months ago
but I am still unable to get past this error. Help?
This appears to be a known widespread issue with the Bionic images. The following is a workaround until it's fixed:
Download the box manually from here
Run vagrant box add --name ubuntu/bionic64 /path/to/bionic-server-cloudimg-amd64-vagrant.box
Try vagrant up again
I've been having that issue for a while now. I would just go with the hashicorp box for Ubuntu 18 (bionic64)
Vagrant.configure("2") do |config|
# Ubuntu 18 (bionic64) from Hashicorp
config.vm.box = "hashicorp/bionic64"
end

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.

vagrant can't run, when i typed 「vagrant up」,there is no response (no error message)!

My os is windows 7;
vagrant box add firstBox ./virtualbox.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'firstBox' (v0) for provider:
box: Unpacking necessary files from: file://C:/Users/liumeng/vagrant_get
ting_started/virtualbox.box
box: Progress: 100% (Rate: 687M/s, Estimated time remaining: --:--:--)
==> box: Successfully added box 'firstBox' (v0) for 'virtualbox'!
vagrant init fistBox
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.
vagrant box list
$ vagrant box list
firstBox (virtualbox, 0)
vagrant up
// There is no response,no error message
I download check virtual cpu tools in windows; ande It's OK;「havdetectiontool」
This computer is configured with hardware-assisted virtualization
The virtualBox can run normally, Could you give me some idea?
I had the same problem the other day.
I tried vagrant_1.9.7_x86_64.msi on my Windows 7 box(CPU=AMD PhenomII).
'vagrant up' went totally silent with no sign of progress and without error messages of any kind.
So I tried older version vagrant_1.9.5.msi and this one just worked fine.
# I don't know whether vagrant_1.9.7_i686.msi works okey or not.

error when try to add box laravel/homestead

Today, I try to add box laravel homestead following document in laravel home page. But I have an error in my laptop using windows 8.1. The first step, I installed vagrant, virtualbox and using syntax vagrant box add laravel/homestead. It's will show error log in git bash :
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:
Then I try syntax: vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead. It's will show error:
$ vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'laravel/homestead' (v0) for provider:
box: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead
box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Again, I run : rm ~/.vagrant.d/tmp/* and vagrant up. But not working.In addition, another computer everything good.What can I do, anyone?
If you are having a similar issue try checking the curl or you can simple copy one if you are using git bash under Windows.
cp /mingw64/bin/curl.exe /c/HashiCorp/Vagrant/embedded/bin/curl.exe

turning files into .tar in vagrant

i've tried fixing the problem "bsdtar: Error opening archive: Unrecognized archive format" #161 but i didnt find an anwser ,
(im using 1.7.4 vagrant which is the latest version.
i tried this approach first :
C:\Users\1>vagrant box add pip C:\Users\1\Desktop
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'pip' (v0) for provider:
box: Unpacking necessary files from: file://C:/Users/1/Desktop
box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /Users/1/Desktop
after failing i tried importing the file through a url,making me get the error on top.:
C:\Users\1>vagrant box add pip https://bootstrap.pypa.io/get-pip.py
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'pip' (v0) for provider:
box: Downloading: https://bootstrap.pypa.io/get-pip.py
box: Progress: 100% (Rate: 826k/s, Estimated time remaining: --:--:--
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):
bsdtar.EXE: Error opening archive: Unrecognized archive format
Vagrant expects either a box path/url or a name of the box that is available on Vagrant Atlas. You give it just arbitrary things that do not contain a box.
To e.g. download the Ubuntu Trusty x64 box, use
vagrant box add ubuntu/trusty64

Resources