I\'ve already seen these answers, so please don\'t link em in solutions:
Installing MongoDB on Ubuntu 16.04 https://unix.stackexchange.com/questions/220
I have tried many answers, but at last, I found that make system version is not matched to the mongo repo required version. At MongoDB official website, there is an option to let you choose the correct repo link. So, check your system version firstly with:
lsb_release -dc
Then if your system version is 18.04, try
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
If your system version is 16.04, try
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list