41

I am on windows 10 and has VirtualBox 5.0.14 and vagrant 1.8.1 installed in it.

While i try to add a box it gives me this error:

Command: $ vagrant box add ubuntu/trusty64

Error:

The box 'ubuntu/trusty64' 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/ubuntu/trusty64"] Error:

Any idea for this issue?

6
  • can you download the file directly : atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20160215.0.0/… and then add a box from this downloaded file Feb 22, 2016 at 21:35
  • 1
    On windows, try with quotes, as in "ubuntu/trusty64"
    – greenhorn
    Mar 2, 2016 at 0:39
  • FYI On macOS you do need 'sudo', without it doesn't work. Nov 15, 2016 at 18:25
  • These are probably not the answers. What happened is that Hashicorp changed its download URL! Upgrade to Vagrant 2.x and you will not have this problem. Feb 24, 2018 at 11:44
  • Do you use a VPN? I had this issue when it was enabled, probably because the server was blacklisted.
    – IT-bob
    May 25, 2021 at 11:05

7 Answers 7

166

Try this

$ sudo rm /opt/vagrant/embedded/bin/curl

https://github.com/Varying-Vagrant-Vagrants/VVV/issues/354

9
  • 1
    Thanks I wonder how you found this since even with --debug on it doesn't talk about curl. Nov 14, 2016 at 5:29
  • 3
    This works and is still required in Vagrant 1.8.7 and virtual box 5.1.X on OSX.
    – bjw
    Nov 14, 2016 at 12:20
  • As bjw stated, same issue happened here with Vagrant 1.8.7 and VB 5.1.x, this helps! thank you! Nov 16, 2016 at 3:11
  • hope thy fix this in the next vagrant release
    – PartySoft
    Nov 18, 2016 at 15:25
  • 1
    Worked for OSX, Vagrant 1.8.7. Thank you!
    – vasya10
    Nov 29, 2016 at 3:32
52

Potential TOP reason after 2018: Hashicorp has changed the download URL.

For a quick workaround add this to your Vagrantfile:

Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')

and run vagrant up again.

or

Upgrade vagrant to v2.0+


More details: https://github.com/hashicorp/vagrant/issues/9442

6
  • This works on Vagrant 1.9 also. By adding "Vagrant::DEFAULT_SERVER_URL.replace('vagrantcloud.com')"to my Vagrant file, I was able to dowload the ubuntu/xenial64 vbox. May 25, 2018 at 8:15
  • I get the error uninitialized constant Vagrant::DEFAULT_SERVER_URL (NameError) on running vagrant up after making the change. Nov 21, 2018 at 9:48
  • @BarunSharma What is your vagrant version? Use vagrant -v to get it. Nov 21, 2018 at 10:06
  • @AttilaFulop - its 'Vagrant version 1.0.1' Nov 21, 2018 at 19:47
  • @BarunSharma 1.0.1 is almost 7 years old. I couldn't find which version was the constant introduced, but looks 1.0.1 is way too old. Nov 22, 2018 at 6:35
4

Installing Microsoft Visual C++ 2010 SP1 Redistributable Package (as mentioned in ticket #6745) solved the issue for me.

1
  • I found that ticket before I found your answer, but your answer is definitely correct here. Right after installing that package, Vagrant is now working as expected. Jun 14, 2016 at 2:12
3

There are issues with the new version 1.8.x of vagrant and Windows 10 as described in ticket #6745 and a string of related tickets. I tried some of the advice that people are giving, but the one thing that works straight away is to downgrade your vagrant to version 1.7.4.

To do that first uninstall your current version 1.8.x. Then go to the vagrant download page, and then select download older versions of Vagrant. There you can select vagrant_1.7.4.msi.

Install version 1.7.4, reboot your machine and you are ready to go (again) using the statement as per your question:

$ vagrant box add ubuntu/trusty64

It should start to download without further issue.

2

I had this problem starting the vagrant box (Using git as Terminal, https://git-scm.com/download/win):

$ vagrant box add ubuntu/trusty64
The box 'ubuntu/trusty64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Vagrant Cloud, 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://vagrantcloud.com/ubuntu/trusty64"]
Error: schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.

The problem was my anti virus (Kaspersky) that was preventing me from adding the box. I deactivated the anti virus and the command worked:

$ vagrant box add ubuntu/trusty64
$ vagrant init ubuntu/trusty64
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

NASA@DESKTOP-P6O3UKQ MINGW64 /d/Vagrant1
$ vagrant up
5
  • This question is very confusing due to the formatting. I think you are using code blocks to write down your experience and regular text to right down input/output from the terminal? That's like the opposite of what you should be doing. Apr 20, 2021 at 10:46
  • @MichaelHoobler But.. this is an Answer :)
    – Scratte
    May 26, 2021 at 20:35
  • @Scratte You're right, this is an answer and not a question. Looks like someone went through and edited your post, but try to use the code blocks and other formatting tools correctly in your future questions/answers so that your posts end up being as helpful as possible. Your insight is appreciated and it'd be a shame if someone needed this answer and skipped it because the formatting was weird. :) May 27, 2021 at 14:03
  • 1
    @MichaelHoobler Thanks for the tip, but.. this isn't my Answer.
    – Scratte
    May 27, 2021 at 15:18
  • Thanks for the tip, Kaspersky was the issue for me!
    – Ryhazerus
    Feb 26, 2022 at 12:29
-1

I had the same issue on Windows 10 and Vagrant 1.9.1. I tried all the above tricks (installing VisualC++, downgrading Vagrant to 1.7, copy over curl from git bash, installing openssh) but finally I found the solution thus:

  1. vagrant up --debug: it revealed that home dir for vagrant was my user homedir which was having non-latin symbols. When vagrant downloads box file from external url, it tries to save it in its home dir, which is ~/.vagrant.d (for Windows that means for example C:/Users/Ольга/.vagrant.d)
  2. vagrant.d outside of the home folder - change file \HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.5.3\lib\vagrant\environment.rb on line 119 to @home_path = Util::Platform.fs_real_path("C:/vagrant/home/") - where C:/vagrant/home can be any dir without non-latin symbols, for example, c:/HashiCorp/Home.
-2

It will fix your error:

vagrant destroy

Use version 5.18 of virtual box, then install version 1.9.2 of a vagrant. Restart your computer. Now go to the directory you want to work in.

vagrant init ubuntu/trusty64
vagrant up

Not the answer you're looking for? Browse other questions tagged or ask your own question.