Can't add laravel/homestead box. “SSL certific

2019-06-26 04:44发布

问题:

I've installed laravel homestead on two other machines and never seen this problem before. I've searched and searched, implemented plenty of suggested fixes and nothing is working for me.

I've installed virtual box and vagrant and I'm stuck at the first hurdle:

vagrant box add laravel/homestead

returns the following error:

I've installed curl.exe with all the dll files I could find and the certificate bundle file in my path environment.

Curl is definitely installed but nothing I try works. Do I need a certificate from the destination site?

Other information that might be of use:

  • Recently did a clean install of windows 8.1 because my new Lenovo laptop came full of adaware
  • php was installed through xampp
  • composer installed
  • latest version of virtual box and vagrant installed

Any help is appreciated.


Ok so I was able to circumnavigate the problem by manually downloading the laravel/homestead virtual box and requiring it from it's download location following advice in the comments here.

This allowed me to install laravel and get it running but I never solved the problem so it's come back to bite me whenever I try to require from composer.

The main concern is the RuntimeException however I have come across this exception before and solved it by removing the semi-colon before ;extension=php_openssl.dll

Similarly help on the matter advises me to do the same, however checking my php.ini file in ~/xampp/php shows that the semi-colon is not even present and yet I still get the RuntimeException.

I can only assume the cURL warnings at the top have something to do with this happening.

I'm going to try reinstalling xampp, although I'm not optimistic.

回答1:

vagrant box add --insecure laravel/homestead


回答2:

Uninstalling xampp and completely removing its directory, then reinstalling, seems to have solved the problem.

I no longer get the curl warnings as everything to do with curl that I added, I believe, was removed when xampp got uninstalled.

No idea why I was having the SSL certificate problem in the first place but as stated in the original post, manually downloading the vm got me around it.