I'm using Vagrant for my environment and I've got a little issue:
$vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'base' (v0) for provider: virtualbox
default: Downloading: base
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /Users/.../base
I have initialised my project with vagrant init
but for some reason vagrant up
refuses to work.
This question is related to
vagrant
i experience this error too. I think it was because I failed to supply a box_url..
vagrant init precise64 http://files.vagrantup.com/precise64.box
This work for me on Windows 10: https://stackoverflow.com/a/31594225/2400373
But it is necessary to delete the file: Vagranfile
after use the command:
vagrant init precise64 http://files.vagrantup.com/precise64.box
And after
vagrant up
When you do vagrant init , it replaces the vagrant file in your repo and can give you that error. So I would suggest you copy the original vagrant file from remote or a backup vagrant file and try vagrant up after that.
I came across same issue and I just copied the vagrant file from my remote repo and replaced the vagrant file I was trying to run. This synced the configurations in the vagrant file with the VM.
you can also just add the vm to your machine
vagrant box add precise32 http://files.vagrantup.com/precise32.box
I faced same issue when I ran following commands
vagrant init
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'base' (v0) for provider: virtualbox
default: Downloading: base
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't open file /home/...../base
I corrected with
>vagrant init laravel/homestead
>Vagrant up
It worked for me.
Happy coding
vagrant init laravel/homestead
and then
vagrant up
Was what worked for me.
Please run this in your terminal:
$ vagrant box list
You will see something like laravel/homestead(virtualbox,x.x.x)
Next locate your Vagrantfile
and locate the line that says
config.vm.box = "box"
replace box
with the box name when you run vagrant box list
.
well, actually you have to do:
vagrant up laravel/homestead
because according to homestead walkthrough you've just downloaded it: http://laravel.com/docs/5.0/homestead by:
vagrant box add laravel/homestead
so you have to launch the box you mean to use - not some random ubuntu image ;)
work to me these are the following steps:
cd homestead
(in your directory homestead folder) OR cd Homestead
del vagrantfile
or rm -Rf Vagrantfile
vagrant init laravel/homestead
vagrant up
I solved this problem by going to folder .vagrant.d/boxes/
under your home and changed name of the folder from laravel-VAGRANTSLASH-homestead
to base
.
And it worked for me.
Please check if virtualization is enabled in your BIOS.
The first and most important step before starting a Vagrant is, check which all boxes are present in your system. Use this command for getting the list of boxes available.
vagrant box list
Then move to further process that is, selecting a particular box
vagrant init ubuntu/trusty64
(I have selected ubuntu/trusty64)
then,
vagrant up
Thanks
Check Homestead.yaml file carefully.Check if there is any extra space character after line ends. Then, open gitbash -> go Homestead directory -> command "vagrant up --provision".
This happened due to having a vagrant file without a defined box name. this happen when you running vagrant init with out a box name parameter.
So you have to delete the Vagrant file then
vagrant init box-title
vagrant up
I hope this could help!
Check the following entry in your Vagrantfile
Every Vagrant development environment requires a box.
You can search for boxes at https://vagrantcloud.com/search.
config.vm.box = "base"
This is the default file setting which is created with vagrant init command. But what you need to do is do initialise vagrant environment with an OS box. For instance $vagrant init centos/7. And the Vagrantfile will look something like this:
Every Vagrant development environment requires a box.
You can search for boxes at https://vagrantcloud.com/search.
config.vm.box = "centos/7"
This will resolve the error of not found base when doing a vagrant up.
If you're using OS X and used the standard install, Delete vagrant's old curl and it should now work
sudo rm /opt/vagrant/embedded/bin/curl
I know this is old, but I got exactly the same error. Turns out I was missing this step that is clearly in the documentation.
I needed to edit the Vagrantfile
to set the config.vm.box
equal to the image I had downloaded, hashicorp/precise32
. By default it was set to base
.
Here's what the documentation says:
Now that the box has been added to Vagrant, we need to configure our project to use it as a base. Open the Vagrantfile and change the contents to the following:
Vagrant.configure("2") do |config| config.vm.box = "hashicorp/precise32" end
With me I got an error when run vagrant up
is (I used Macbook pro, Mac OS: 10.12.1):
An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.
Couldn't open file...
I tried to delete the Vagrantfile
in my folder and run:
vagrant init hashicorp/precise64
then:
vagrant up
It can solved my problem. Hope this can help for someone who face the same problem.
There appears to be something wrong with the embedded curl program in Vagrant. Following the advice above I just renamed it (just in case I wanted it back) and vagrant up
began to work as expected.
On my mac:
? .vagrant.d sudo mv /opt/vagrant/embedded/bin/curl /opt/vagrant/embedded/bin/curlOLD
Password:
if "Vagrantfile" already exists in this directory. Remove it before running "vagrant init".
error shows then
1. rm Vagrantfile
2. vagrant init hashicorp/precise64
3. vagrant up
edit the vagrant file created by vagrant init
in the same directory and enter the box name in the line config.vm.box = "ubuntu/trusty64"
where ubuntu/trusty64
is your base box. Now vagrant up
will download and set ubuntu/trusty64
as base box for you.
Follow the below syntax when creating the virtual box:
$ vagrant box add {title} {url}
$ vagrant init {title}
$ vagrant up
It looks like you may have created a Vagrant project with just vagrant init
. That will create your Vagrantfile, but it won't have a box defined.
Instead, you could try
$ vagrant init hashicorp/precise32
$ vagrant up
which uses a standard Ubuntu image. The Vagrant website has a Getting Started which gives some good examples.
In case, you added a box and started downloading it but interrupted that download, go to ~/.vagrant.d/tmp/
and delete the partial download file, then try again.
Source: Stackoverflow.com