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
Related
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
I have a freshly installed Laravel. I did a vagrant destroy --force before installation.
Every time I run anything using vagrant on my laravel project directory, I get this error.
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: /Applications/MAMP/htdocs/Sites/project-flyer/Vagrantfile
Line number: 12
Message: LoadError: cannot load such file -- /Applications/MAMP/htdocs/Sites/project-flyer/vendor/laravel/homestead/scripts/homestead.rb
exit 1
Now, I've checked, looking for homestead.rb but vendor/laravel/homestead folder doesn't exist. I'm lost.
It seems there is a broken homestead installation in your directory. You could do:
Deinstall the existing homestead with composer remove laravel/homestead
Reinstall homestead with composer require laravel/homestead --dev
Initizialie homestead and Vagrant configuration php vendor/bin/homestead make
For details you can also consult the homestead documentation.
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.
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.
I am following an online training course which is showing me how to install laravel, I am having trouble installing homestead, I followed the instruction to download Vagrant and Virtualbox which I have done. Then I am told to run a terminal command:
$ vagrant box add laravel/homestead
I get the following strange message:
/opt/vagrant/embedded/gems/gems/bundler-1.10.5/lib/bundler/shared_helpers.rb:78:in `split': invalid byte sequence in UTF-8 (ArgumentError)
from /opt/vagrant/embedded/gems/gems/bundler-1.10.5/lib/bundler/shared_helpers.rb:78:in `set_bundle_environment'
from /opt/vagrant/embedded/gems/gems/bundler-1.10.5/lib/bundler/runtime.rb:222:in `setup_environment'
from /opt/vagrant/embedded/gems/gems/bundler-1.10.5/lib/bundler/runtime.rb:15:in `setup'
from /opt/vagrant/embedded/gems/gems/bundler-1.10.5/lib/bundler.rb:129:in `setup'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/bin/vagrant:71:in `<main>'
and then nothing happens.
Could anybody please tell me what is going on. especially with the - 'split' : invalid byte sequence in UTF-8 (ArgumentError).
I am on Yosemite 10.10.4.
Try changing path to .vagrant.d
export VAGRANT_HOME="..."