0

I have created an instance in Alibaba Cloud Simple Application Server with Ubuntu 14.04 as system Image. I am trying to install MongoDB CE on the server by following the official documentation here

I am stuck at the following command

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list

I have even tried the below command

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu "lsb_release -sc"/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list

nothing works, I get the following message:

sudo: unable to resolve host iZrj9gu3lzfytle0g2yhtiZ deb
https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse

There are other repositories people used in other references. But I cannot use that. I would like to know why this didn't work even from the official documentation.

Any help is appreciated. Thanks!

  • What region? From a shell window can you ping mongodb.org? My guess is that your instance is in China and the URL is blocked. Verify that you have actual public Internet access. – John Hanley May 08 '18 at 20:52

2 Answers2

1

two ways to solve it.

  1. you still wish to use ECS to build your mongoDB check your ECS region, check linux configuration under /etc/hostname. you also could download the package on your computer and then upload it

  2. you directly use the ApsaraDB for MongoDB service ,it is a better and faster way.

0

You may have to take a look at your /etc/hostname file and that it contains the name of your computer. Just your computer.

I might suggest you this thread, it might be helpful: https://askubuntu.com/questions/59458/error-message-sudo-unable-to-resolve-host-user/177381

Deepak Kamat
  • 107
  • 5