废话不多说,执行以下7步就完成:
1. apt update && sudo apt upgrade -y && apt-get install gnupg
2. echo "deb http://security.ubuntu.com/ubuntu focal-security main" | tee /etc/apt/sources.list.d/focal-security.list
3. apt update && apt install libssl1.1
4. wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | apt-key add -
5. echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list
6. apt update
7.apt install -y mongodb-org