Score:0

Issues installing mongodb on windows 11 WSL 2 running Ubuntu

ky flag

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.

NotTheDr01ds avatar
vn flag
Please keep in mind that I asked you to include some additional clarification when you [posted this on Stack Overflow](https://stackoverflow.com/q/74571985/11810933) -- *"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 avatar
vn flag
Also, what version of Ubuntu are you running? Thanks!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.