Apt-get fails on 16.04 installing mongodb - Ask Ubuntu
when attempt install mongodb using instructions on https://docs.mongodb.com/getting-started/shell/tutorial/install-mongodb-on-ubuntu/
on 16.04 following result on install step:
jonathan@poseidon:~$ sudo apt-get install mongodb-org reading package lists... done building dependency tree reading state information... done package mongodb-org not available, referred package. may mean package missing, has been obsoleted, or available source e: package 'mongodb-org' has no installation candidate
i checked http traffic wireshark , found traffic http list , http 304 response suggests problem lies in local configuration files. sources.list.d file contains following entry:
mongodb-org-3.4.list
what need continue troubleshoot problem?
edit: tried again on new install of 16.04 under virtualbox. retrieved key, created list file, , did sudo apt update
following results:
jonathan@ubuntu-16:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0c49f3730359a14518585931bc711f9ba15703c6 [sudo] password jonathan: executing: /tmp/tmp.uwypruwfjk/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 0c49f3730359a14518585931bc711f9ba15703c6 gpg: requesting key a15703c6 hkp server keyserver.ubuntu.com gpg: key a15703c6: public key "mongodb 3.4 release signing key <packaging@mongodb.com>" imported gpg: total number processed: 1 gpg: imported: 1 (rsa: 1) jonathan@ubuntu-16:~$ echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse jonathan@ubuntu-16:~$ sudo apt update ign:1 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 inrelease get:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 release [3 462 b] hit:3 http://mx.archive.ubuntu.com/ubuntu xenial inrelease get:4 http://security.ubuntu.com/ubuntu xenial-security inrelease [94.5 kb] get:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 release.gpg [801 b] get:6 http://mx.archive.ubuntu.com/ubuntu xenial-updates inrelease [95.7 kb] ign:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 release.gpg get:7 http://mx.archive.ubuntu.com/ubuntu xenial-backports inrelease [92.2 kb] reading package lists... done w: gpg error: http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 release: following signatures couldn't verified because public key not available: no_pubkey d68fa50fea312927 e: repository 'http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 release' not signed. n: updating such repository can't done securely, , therefore disabled default. n: see apt-secure(8) manpage repository creation , user configuration details. jonathan@ubuntu-16:~$
as can see, key retrieved mongodb 3.4, not mongodb 3.2 , explains gpg failure in apt update. 1 know correct key?
note: these instructions mongodb 3.2.
let's redo installation steps mongodb.
first, remove existing repository file mongodb.
sudo rm /etc/apt/sources.list.d/mongodb*.list
next, add key: (without key, repository not load)
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv ea312927
now, create new mongodb repository list file:
sudo bash -c 'echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" > /etc/apt/sources.list.d/mongodb-org-3.2.list'
complete installation update of repositories install:
sudo apt update sudo apt install mongodb-org
hope helps!
Comments
Post a Comment