Я новичок в ubuntu и mongodb. Оба .ubuntu установлен на vm, размещенном windows 8.1. Я пытался установить mongodb v4.2.2 на ubuntu v18.04 bioni c :
Импорт ключа publi c
ubuntu@ubuntu:~$ wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
OK
Установить gnupg и необходимые библиотеки
ubuntu@ubuntu:~$ sudo apt-get install gnupg
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnupg is already the newest version (2.2.4-1ubuntu1.2).
The following package was automatically installed and is no longer required:
linux-modules-5.0.0-36-generic
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 55 not upgraded.
Повторите попытку импорта ключа
ubuntu@ubuntu:~$ wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
OK
Создайте файл /etc/apt/sources.list.d/mongodb-org-4.2.list для Ubuntu 18.04 (Bioni c)
ubuntu@ubuntu:~$ echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse
ubuntu@ubuntu:~$ sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:3 http://packages.microsoft.com/repos/vscode stable InRelease
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:6 https://deb.nodesource.com/node_13.x bionic InRelease
Ign:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 InRelease
Ign:8 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 InRelease
Hit:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 Release
Get:10 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Hit:11 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 Release
Get:4 http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist InRelease [121 kB]
Err:4 http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Reading package lists... Done
E: Failed to fetch http://downloads-distro.mongodb.org/repo/ubuntu-upstart/dists/dist/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Как видите, на этом шаге я получаю некоторые ошибки, которые не могу исправить. На самом деле я понятия не имею, что является причиной ошибок.
Я установил mongodb без ошибок в любом случае
ubuntu@ubuntu:~$ sudo apt-get install -y mongodb-org
Затем я запустил его и проверил его status
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-01-21 10:24:32 PST; 4s ago
Docs: https://docs.mongodb.org/manual
Process: 2164 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=48)
Main PID: 2164 (code=exited, status=48)
Jan 21 10:24:32 ubuntu systemd[1]: Started MongoDB Database Server.
Jan 21 10:24:32 ubuntu systemd[1]: mongod.service: Main process exited, code=exited, status=48/n/a
Jan 21 10:24:32 ubuntu systemd[1]: mongod.service: Failed with result 'exit-code'.
, пожалуйста, помогите мне решить эту проблему