I am trying to install laravel homestead. I follow the steps on the site, but when i am at the step where i have to do:
vagrant box add laravel/homestead
I have windows and i use git bash. He downloads a while and then i get this error message(this is the all the text when i download(maybe it is helpfull for you). The error is at the bottom):
$ vagrant box add --insecure laravel/homestead
==> box: Loading metadata for box 'laravel/homestead'
box: URL: https://atlas.hashicorp.com/laravel/homestead
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.
1) parallels
2) virtualbox
3) vmware_desktop
Enter your choice: 2
==> box: Adding box 'laravel/homestead' (v2.1.0) for provider: virtualbox
box: Downloading: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/2.1.0/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
box:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
I read maybe it works when i did: vagrant box add laravel/homestead -c, but dont works for me. And i tried this: http://slick.pl/kb/software/vagrant-fix-for-error-60-ssl-read/. This also dont work.
Can someone help me?
Thanks
Here is what was discussed in the comments to fix this. Issue is here
Github Isuue
Here is the general consensus though, replace the https to http as below
vagrant box add laravel/homestead http://atlas.hashicorp.com/laravel/boxes/homestead
OR
vagrant box add --insecure -c laravel/homestead http://atlas.hashicorp.com/laravel/boxes/homestead
Related
https://medium.com/#eaimanshoshi/i-am-going-to-write-down-step-by-step-procedure-to-setup-homestead-for-laravel-5-2-17491a423aa
I followed this documentation and its always failing when running this command vagrant box add laravel/homestead
So I decided to install vagrant box manually.
I have this url https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.5.0/providers/virtualbox.box to download vagrant box but I have received 404 Not Found
And this link I followed to manually install virtual box https://gist.github.com/idecardo/deec25b8fa54976edb496d7ce7d320a7
Anyone can help me with this? Where I can find the virtualbox.box to download?
Thanks in advance!
Yes, you can download virtualbox.box from
https://app.vagrantup.com/laravel/boxes/homestead/versions/6.4.0/providers/virtualbox.box
Change the version of homestead box. Current version: 6.4.0.
Check for the latest version here: https://app.vagrantup.com/laravel/boxes/homestead
After downloading the box, rename it to virtualbox.box
Don't forget to include the .box extension.
Add the downloaded homestead box to vagrant:
vagrant box add laravel/homestead /path/to/virtualbox.box
Change the path to where you stored your downloaded homestead box.
Had the same problem.
Running vagrant box add laravel/homestead download slowly and will eventually timeout.
So i manually downloaded it thru this link:
laravel homestead
Hope it help.
When I run homestead provision,it returns php5-fpm: unrecognised service.
I've found an answer saying unchecking "Restart FPM After Deployments" in Server Options.But I can't find Server Options anywhere.And I'm not sure we got the same problem.
If you've got error php5-fpm: unrecognised service usually it's happens because you have several homestead boxes (for check it run vagrant box list) (newest boxes use php7-fpm inside).
There are two ways to solve this problem:
Remove newest homestead box.
OR
Update your laravel/homestead dependency in composer.json and use new version of homestead.
I was wondering how I would be able to run multiple versions of homestead without having VirtualBox crash.
I am currently running a default installation of the laravel homestead, but I need to install another older version, the reason is that in current version 0.4.0 the mysql server is 5.7 which is fine, but i need another environment with 5.6 because i have an old project which requires 5.6, so homestead version 0.3.0 would be fine.
Just to be clear: I know how to run multiple sites. That is not the issue. I just want to run a second, custom version of the Laravel Homestead Vagrant box, while still having the possibility to run my normal one.
Details: i managed to add both versions. Output of:
vagrant box list
laravel/homestead (virtualbox, 0.3.0)
laravel/homestead (virtualbox, 0.4.0)
so version 0.4.0 is running fine, now how i can run 0.3.0 ?
Thanks in advance!
Ok i managed it.
I will post the solution for those who faced this issue, because I was not able to find a step by step guide with a homestead related instructions.
Without too much theory the steps are:
Decide which box version you need from here (https://atlas.hashicorp.com/laravel/boxes/homestead), in my case it was 0.3.0 and run
vagrant box add laravel/homestead --box-version 0.3.0
Find on github the propper release of homestead (https://github.com/laravel/homestead/releases) in my case it was (v2.1.8)
and download and extract it to a directory for example Homestead2 in your home folder
Inside Homestead2 directory find scripts/homestead.rb file and edit it.
find lines
config.vm.box = settings["box"] ||= "laravel/homestead"
config.vm.hostname = settings["hostname"] ||= "homestead"
between them add line, in my case :
config.vm.box_version = "0.3.0"
you can also rename
vb.name = settings["name"] ||= "homestead"
if you wish
from within this directory run vagrant up
after this you can use it as usual.
I hope this helps somebody.
There's an option for running a box with version in Vagrantfile.
In your case you need to add box_version to your Vagrantfile similar to this:
Vagrant.configure('2') do |config|
// This line
config.vm.box_version = 0.3.0
end
You can check it out from documentation.
Homestead randomly stopped working for me, so I tried to remove the whole thing and reinstall, but it's not gone well.
I have it "running" after a day and a half of muddling my way through various issues. However, for reasons that I cannot understand, my Homestead box is now running PHP 7.
The instructions I was following had optional options for installing PHP 7, but I intentionally skipped that because we are on PHP 5.
For the life of me, I can't figure out how to fix this. Things I have tried:
I have destroyed and reinstalled the box multiple times.
I have deleted the VirtualBox box multiple times and redownloaded it.
I tried installing v0.3.3 of the box based on one suggestion. (I also updated the homestead.rb script accordingly.) At one point, something failed during the install process with php7.0-fpm: unrecognized service and the configured sites were returning 502 Bad Gateway errors.
After reinstalling with v.0.4.0, it has started "running" as I described (serves the sites as expected, etc.), but with PHP 7.
Searching for solutions has persistently led to a dead-end.
I'm just a dummy front-end developer. :) Laravel, Vagrant, Homestead, all this stuff makes my head hurt. I just want this to work again so I can go back to my actual work. Any advice or alternate avenues of pursuit for researching this problem would be appreciated.
I've been through this issue too and I solved it by installing an old homestead box v0.3.3 and I've used an old release of homestead installer, so I suggest that you remove your current box v0.4.0 and delete your homestead folder then do this:
$vagrant box add laravel/homestead --box-version 0.3.3
and then download an older version of Homestead installer from git, I'm using v2.1.8 it works fine.
Enjoy php 5.6 :)
I had a similar problem where I tried to upgrade Homestead to the most recent Homestead 7.0 box and configure it to run PHP 5.6 instead of PH7, which various sources said was possible via adding a line to the .yaml file specifying the PHP version.
sites:
- map: myproject.local
to: /home/vagrant/Code/craven/public_html
php: "5.6"
What actually happened when I tried that was that I got a 502 CGI gateway error. Here is a summary of the steps I had to take to fix it:
1) SSH into the Homestead virtual machine.
ssh vagrant#127.0.0.1 -p 2222
Taking a look at the nginx error log in /var/log/nginx/ reveals that the PHP 5.6 files the server is looking for don't exist.
You can get confirmation of this by having a look at the executables.
ls -la /usr/bin/php*
2) To install PHP 5.6, run
sudo apt-get update
sudo apt-get install php5.6-fpm
You can confirm that the php 5.6 service is running via the command
service --status-all
3) Once all this is working, refresh the web page for your site and it should now work. In my case, because I was running a Laravel 4.2 site, I then to install Mcrypt:
sudo apt-get install php5.6-mcrypt
4) In order to get my mysql database up and running, I also had to install mysql.
sudo apt-get install php5.6-mysql
And of course after all that, I had to re-import the database contents from the file I'd exported before upgrading the Homestead box.
Note that if you ever destroy and recreate the Homestead box, you will need to repeat all these steps again.
When I tried to install laravel homestead I face problems
I use git terminal, when I try this
$ vagrant box add laravel/homestead https://atlas.hashicorp.com/laravel/boxes/homestead
I get this error
==> 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.
Could not resolve host: (nil); Host not found
Most probably you should just update Vagrant. Your issue should be fixed with this commit: https://github.com/mitchellh/vagrant/commit/5f12126d32dfa30f5f48d12724eeb29222942cb0
If you do not want to update Vagrant, then solution is to uncomment this parameter in Vagrantfile:
config.vm.box_check_update = false