Installing Vagrant for M312 - error

I get this error:

image

Why are you doing this?
image
And is this your local machine or the VM?

I am following the instructions from here: https://university.mongodb.com/mercury/M312/2019_December_17/chapter/Chapter_1_Introduction/lesson/58a71d0d14c25e300410d8fb/lecture

If I remember correctly, you have taken the M103 course, so you can skip that line. The error indicates a network/firewall issue on your machine so you’ll need to unrestrict it before trying again. And for the sake of testing, try pinging that url.

Besides the above, there’s one thing you’ll need to add in your provision-m312 file:

1 Like

Yes, I did already take the class. I wanted to re-do some of the lessons for the sake of better learning. I am able to ping gems.hashicorp.com from my computer OK. Also, I am able to browse to https://gems.hashicorp.com/specs.4.8.gz and it does allow me to download/save the file. I updated the provision-m312 file and re-tried and still get the same error. I’m on the same computer that I did my original lessons on, so this is somewhat puzzling to me. Thanks! Babak.

:arrow_up: :arrow_up: :arrow_up: and vagrant up instead

image

VirtualBox is already installed, as well.

Follow these steps:

  1. Open your Environment Variables and confirm that you have a system variable called VBOX_MSI_INSTALL_PATH or VBOX_INSTALL_PATH
    image
  2. Open a new terminal and run the following commands:
    vagrant destroy -f
    vagrant up --provider=virtualbox

Thanks for your help, but it seems that the problem was with the version of VirtualBox. Since my original installation it seems that VirtualBox 6.1 came out and that’s what I downloaded. That new version is not compatible w/ the latest version (as of this date) of Vagrant, it seems. I uninstalled VirtualBox 6.1 and downloaded/installed the latest VirtualBox 5.2.x version and all is OK. This article gave me a clue as to what the problem could be: Not able to up the vagrant, Have already installed virtualbox.

Yes I’m aware of this problem. I didn’t expect you to have downloaded the latest version if you had already done other courses.

Yes. I deleted everything and started from the beginning. Sorry for the confusion, but thanks for the help. :slight_smile:

:slightly_smiling_face: :+1:

The lib faker dropped support of Python 2.7. Therefore you have to fix compatible version in provision-m312:
function install_python_dependencies(){
sudo apt-get install -y python-dev
sudo apt-get install -y python-pip
sudo pip install pymongo
sudo pip install docopt
sudo pip install faker==3.0.1
sudo pip install psutil
sudo pip install mtools==1.5.3
}

3 Likes

Need to make @Sonali_Mamgain aware of this… post #5 and @evgeni’s post.

I mentioned in one of the other courses that these dependencies should ideally be version specific to avoid problems of this nature and for other reasons. It’s a common DevOps strategy.

1 Like

Getting an error while trying to setup the environment. It fails while trying to install faker. See the attached snapshot. Please help.

The answers are within the posts. Have you read through this thread?

Yes, I did read through the thread. As advised, I did not run the command “vagrant plugin install vagrant-vbguest”.

VirtualBox version is 6.0.16. Have also updated the provision-m312 file for the mtools version to be 1.5.3. Of course, mtools is not installed as it fails at faker.

I have destroyed the currently installed m312 by running:
vagrant destroy m312 -f

Even after that, the install fails. Any other pointers?

Thanks for your help.

let me try faker==3.0.1 - have not tested that one yet. Will report once done