2

I am trying to install mongodb on my laptop with Ubuntu 16.04 LTS. When I executed this command

echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

this error showed up:

 sudo: unable to resolve host architect

Note: I have tried with [ arch=i686,i686 ] which is my pc architecture. What's the problem?

Kaz Wolfe
  • 34,680
nurulnabi
  • 121
  • 2

1 Answers1

1

I'm not sure where you got that command, but the following command would have worked:

echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

Now that you already have /etc/apt/sources.list.d/mongodb-org-3.4.list, you need to edit it (ie: with vim or nano) so that contains a single line that reads:

deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse

Be sure to run apt-get update to sync and update available packages, and add 10gen's apt key.

earthmeLon
  • 11,658