error in setting up vagrant as local development environment - laravel

I have vagrant (Vagrant 2.0.4) and Oracle VM Virtual Box (Version 5.2.10 r122406 (Qt5.6.2)) installed on my machine.
As soon as I enter vagrant box add laravel/homestead or vagrant box add laravel/homestead http://atlas.hashicorp.com/laravel/boxes/homestead on Git Bash, I get the following error:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again. OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054
Problem Statement:
I am wondering, what command I need to enter on my Git Bash so that I am successfully able to laravel/homestead for virtualbox.
I followed this answer, but it didn't solve my problem.

try emptying the temp first by running this command:
rm -rf ~/.vagrant.d/tmp/
then running the following command:
vagrant box add --insecure laravel/homestead
if this doesn't work ,then empty your temp by :
pressing win +r
typing %temp% then hitting enter
then delete everything in there and if asked to continue or skip, choose skip
then connect to a VPN and try running the following command :
vagrant box add laravel/homestead
hope this helps.

Related

Vagrant box add - Failed to connect to cloud-images.ubuntu.com port 443: Timed out

I'm new to Vagrant. Using this vagrant add box command:
vagrant add box ubuntu/trusty64
to add this box ubuntu/trusty64, I'm getting this error:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Failed to connect to cloud-images.ubuntu.com port 443: Timed out
Reinstalling Vagrant didn't work.
vagrant -version output: Vagrant 2.1.4
OS: Windows 10 Enterprise
first initialize the vagrant
$ vagrant init ubuntu/trusty64
$ vagrant up
Reinstalling VirtualBox fixed it for me. To be on safe side I removed Vagrant, Git Bash and VirtualBox and all references. Reinstalled all of these using default settings. Issue doesn't occur anymore.

Vagrant, can't download box

not sure why I'm having this issue but I can't add vagrant boxes.
Using windows 10, tried on powershell and simple command prompt. same issue. It's a relatively fresh install of windows. Maybe I'm missing some required package?
first i tried this command:
vagrant box add hashicorp/precise32
and got the error:
The box 'hashicorp/precise32' 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/hashicorp/precise32"]
Error:
So I downloaded the box manually and tried this:
vagrant box add base64 file:///D:/downloads/vagrant_boxes/precise64.box
And got this error again:
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'base64' (v0) for provider:
box: Unpacking necessary files from: file:///D:/downloads/vagrant_boxes/precise64.box
box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
The libraries on current version (as of this date) OSX don't support the version of curl bundled with Vagrant 1.8.7. I installed 1.8.6 and everything worked like a champ. To test this theory:
cd /opt/vagrant/embedded/bin
./curl --help
If you get a 'normal' reply than you should be fine or there's something else wrong.
I was using vagrant v1.8.0 when this happened. Later that day vagrant v1.8.1 was released. I didn't try that, instead I shifted back to v1.7.4 and the issue was gone.
I've been resolving this issue since I installed vagrant 1.8.1, I tried to installed lower version but i came up with the same problem. Hopefully, I solve it here:
first make sure you installed Microsoft Visual C++ 2010 SP1 Redistributable.
here is for 64bit https://www.microsoft.com/en-us/download/details.aspx?id=13523
next, download ssl version of curl in my case 64bit also. here:
https://curl.haxx.se/latest.cgi?curl=win64-ssl-sspi
now extract the curl.exe to C:\Vagrant\embedded\bin. please see your installation directory.
and then done. if your not using ssl try the no-ssl version of curl. hope helps
Check the C: \ HashiCorp \ Vagrant \ embedded \ bin \ curl.exe
case give an error, there is your problem.
To solve, just download gitbash, console2, cmder, etc ... you have curl installed, or try http://www.confusedbycode.com/curl/.
however strongly recommend gitbash or cmder
https://atlas.hashicorp.com/hashicorp/boxes/precise32
base on the offical URL.. there is only virutal box provider.
try below command:
vagrant init hashicorp/precise32; vagrant up --provider virtualbox
For MacOS users whom reinstalling new version of vagrant doesn't help:
sudo mv /opt/vagrant/embedded/lib/libiconv.2.dylib /opt/vagrant/embedded/lib/libiconv.2.dylib_
brew install libiconv
brew link --force libiconv
credits to: https://github.com/mitchellh/vagrant/issues/5782
You don`t need to add the box. Init instead of this:
vagrant init hashicorp/precise32
vagrant up
vagrant ssh
Hope it will be added in boxes list automatically.
If you want to set up local box - add it getting few steps:
D:
cd downloads/vagrant_boxes
vagrant box add base64 precise64.box
vagrant up
vagrant ssh

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

Problem while Installing The Homestead Vagrant Box

I'm using ubuntu 14.04, and I'm trying to setup larave/Homestead. But while installing Homestead Vagrant Box I lost internet connection in middle, later on I tried to reinstall it using '$ vagrant box add laravel/homestead'
command line, but it prompts following errors while reinstalling.
1) virtualbox
2) vmware_desktop
Enter your choice: 1
==> box: Adding box 'laravel/homestead' (v0.3.3) for provider: virtualbox
box: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.3.3/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
HTTP server doesn't seem to support byte ranges. Cannot resume.
I tried reinstalling vagrant but this didn't work.
You need to clear the temporary files generated by Vagrant.
This can be achieved in three ways:
Force Clean Install
Add a parameter --clean as such $ vagrant box add laravel/homestead --clean
Manual Deletion
Navigate manually to vagrants temporary folder, by hitting cmd+space and typing ~/.vagrant.d/tmp/, and remove files located there.
Terminal
Open the terminal and remove the temporary files generated by
vagrant:
rm ~/.vagrant.d/tmp/*
Thanks #Nicklas for your quick response. But I solved it adding '-c' flag at end.
$ vagrant box add laravel/homestead -c
This removed files associated with it allocated in .vagrant.d/tmp/
The easiest option is to force the installer to clean the old files, so you just need to use this command
$ vagrant box add laravel/homestead --clean
source

unable to install laravel homestead using command line

i am trying to install laravel homestead in my windows 7 pc but every time fails it starts downloading but after some percentage it stops and display errors like
"SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054"
i have restarted download but every time after some percentage it stops i am tired now please help me
i have installed "vagrant_1.7.4.msi" and "VirtualBox-4.3.30-101610-Win.exe" also
I'm also unable to install it online in Windows 7, it will always stop downloading at some point before 15%.
What I had to do was to download the .box file and add it locally.
You can download the file from:
https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.2.7/providers/virtualbox.box
For convenience rename it to something like homestead-0-2-7-vb.box and do the following:
vagrant box add laravel/homestead file:///c:/homestead-0-2-7-vb.box
Try
vagrant box add --insecure -c laravel/homestead http://atlas.hashicorp.com/laravel/boxes/homestead
It worked for me.
Got it from here
If you can't finish even the manual download, try to download from this mirror. This is a copy of laravel/homestead 0.5.0. Use this command to add:
vagrant box add laravel/homestead "path-to-your-file"
I also had the same error "errno 10054".
However, in my environment I solved it with the following contents.
Windows10 64bit
Git bash 2.21.0
Virtual Box 6.0.4
vagrant 2.2.4
As a result, this was necessary for me.
MSVCR100.DLL
https://www.microsoft.com/en-us/download/details.aspx?id=14632
In my case, the installation was successful if I do it as follows.
To install "MSVCR100.DLL" on windows
To command "Vagrant box add laravel/homestead" at terminal.

Resources