0

I want to install MongoDB on Ubuntu. I am following the official instructions from Install MongoDB on Ubuntu.

Now when I do:

sudo apt-get update

it's giving me:

W: Duplicate sources.list entry http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen amd64 Packages (/var/lib/apt/lists/downloads-distro.mongodb.org_repo_ubuntu-upstart_dists_dist_10gen_binary-amd64_Packages)
W: Duplicate sources.list entry http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist/10gen i386 Packages (/var/lib/apt/lists/downloads-distro.mongodb.org_repo_ubuntu-upstart_dists_dist_10gen_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

I have also removed this entry manually but when I do:

sudo apt-get update

it again downloads the same files. I don't know what the issue is. I want to install the latest MongoDB.

Zanna
  • 70,465
  • Deletion votes under this question don't make sense. Question is duplicate - sure, but deletion isn't necessary here. The post isn't offensive nor it is spam. Plus may point potential future users to the linked question. – Sergiy Kolodyazhnyy Dec 01 '17 at 20:56

1 Answers1

1

It seems like you still have at least one MongoDB-related entry in your apt sources list, otherwise you would not see the error message.

Try running:

grep -r "mongodb" /etc/apt/sources.list*

to see which files still reference the MongoDB apt repository.

Note that the instructions in the MongoDB documentation tell you to put the repo definition in its own file under sources.list.d, rather than in the default sources.list file. It's a cleaner solution; I mention it in case it helps you track down your problem.