0

So, I was trying to install mongodb on WSL following the step by step guide at Microsoft's site. This one: https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-database

But by the moment I reached step 5, when it came to run sudo apt-get update to reload local package database it returned the following error:

E: Malformed entry 1 in list file /etc/apt/sources.list.d/mongodb-org-5.0.list (URI) 

E: The list of sources could not be read.

I looked for a couple of solutions online, but most of them expected you to open a txt file and alter it. Since I am running Ubuntu through the WSL I am not able to do so since I am running Ubutu through WSL.

Just for a matter of enlightening, here follow the commands I used to install mongodb on WSL up to this point:

sudo apt update
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -

echo "deb [ arch=amd64,arm64 ]

https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list

sudo apt-get update

I used to code on a Mac, and hardly ever had any issues at all, therefore I have no clue of how Linux works, so any help would be really appreciated.

  • 1
    Please keep in mind that I asked you to include some additional clarification when you posted this on Stack Overflow -- "most of them expected you to open a txt file and alter it. Since I am running Ubuntu through the WSL I am not able to do so." -- - What do you mean? What file did it tell you to edit and why aren't you able to edit it? And why didn't you include this info when you reposted!? ;-) – NotTheDr01ds Nov 25 '22 at 13:27
  • 1
    Also, what version of Ubuntu are you running? Thanks! – NotTheDr01ds Nov 25 '22 at 13:28

0 Answers0