Getting error when I run vagrant up in puphpet - vagrant

I am trying to set up vagrant locally on my Windows 10 machine, I have pre installed latest version of Vagant and Virtual box. I am trying to setup Ubuntu 14, Apache, PHP and Mysql. After downloading the package from puphpet.com, I CD in to the directory and trying to run vagrant up. I am getting the following error. I also tried with Centos, getting the same error
F:\puphpet (3)\MQLYog>vagrant up
Bringing machine 'local' up with 'virtualbox' provider...
==> local: Box 'puphpet/centos65-x64' could not be found. Attempting to find and install...
local: Box Provider: virtualbox
local: Box Version: >= 0
The box '["puphpet/centos65-x64"]' 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/puphpet/centos65-x64"]
Error:

hmm it looks like the name is correct, can you try to download the box separately :
vagrant box add puphpet/centos65-x64
if you have a SSL error you can run
vagrant box add puphpet/centos65-x64 --insecure
when prompted for the provider, select virtualbox

Vagrant comes with a own curl.exe on Windows, but this seems to be broken.
Try to install Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)
If it does not work, then try this way:
Install a working curl.exe executable Download
Make curl available for the whole system (PATH system-variable) tutorial
Delete or rename the unfunctional curl.exe in C:\HashiCorp\Vagrant\embedded\bin

Related

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 box could not be found error

I am trying to set up virtual machine using virtual box. I have got virtual box and vagrant installed in my windows 7 64-bit machine. I have also built an environment using puphpet. But whenever I try to install the box ubuntu1404-x64 it throws the error
Bringing machine 'machine1' up with 'virtualbox' provider...
==>Machine1: Box 'puphpet/ubuntu1404-x64' could not be found. Attempting to find and install...
machine1: Box Provider: virtualbox
machine1: Box Version: >= 0
machine1: Box file was not detected as metadata. Adding it directly...
machine1: Adding box 'puphpet/ubuntu1404-x64' (v0) for provider: virtualbox
machine1: Downloading: puphpet/boxes/ubuntu1404-x64
machine1:
An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.
I checked the URL https://atlas.hashicorp.com/puphpet/boxes/ubuntu1404-x64/ and the box puphpet/ubuntu1404-x64 does exist.
Also when it says The error message, if any, is reproduced below it does not show any description at the terminal.
I googled the issue, tried some of the answers here at stackoverflow but no result. Please help.
I've had a similar situation in the past, and it helped me to download the box using vagrant command line, instead of having it be downloaded automatically ( from the URL in Vagrantfile ):
$ vagrant box add USER/BOX
see more here. Could you try the same approach? It might work for you as well.
EDIT: on a windows box, Microsoft Visual C++ 2010 redist looks to be needed to perform the provisioning of the box. It can be downloaded here. More info on the puhpet issuet: here
I ran into a similar problem and fixed it by installing the latest version of vagrant.

Spark VM box NOT getting created in windows

I am new to spark. Infact, I started learning it from today from edX.I am setting up my environment in windows so that sparkvm could be used.Following are the upto date Installations that I did on my PC.
Installed Virtualbox
Installed Vagrant
created a directory
C:\Users\Macro\myvagrant
and copy VagrantFile from (https://github.com/spark-mooc/mooc-setup/archive/master.zip)
Then I executed the following command from the specified path in dos.
vagrant up but the following message is coming every time.
How would I get out of this mess?
Update:
After downloading the file and executing the suggested code.I got following error.
vagrant is not able to download the box from its cloud.
you can try the following:
if you're behind a proxy, set the proxy :
export http_proxy=http://your.proxyhost.server:port/
export https_proxy=https://your.proxyhost.server:port/
vagrant up
download the box directly and install: download from https://atlas.hashicorp.com/sparkmooc/boxes/base2/versions/0.0.7.1/providers/virtualbox.box directly or you can use a downloader tool (such as wget as below)
wget https://atlas.hashicorp.com/sparkmooc/boxes/base2/versions/0.0.7.1/providers/virtualbox.box
Then you'll need to install the box
vagrant box add sparkmooc/base2 <location of downloaded box file>
vagrant up

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

Resources