Score:2

Unable to Complete MongoDB Install Ubuntu 22.04

au flag

I'm following MongoDB's official guide for installing on Ubuntu 22.04, but I'm unable to get past step three. I've tried importing the public key and created the list file. When I attempt to execute sudo apt update I receive the following output:

Hit:1 http://packages.microsoft.com/repos/code stable InRelease
Hit:2 http://apt.pop-os.org/proprietary jammy InRelease                                   
Ign:3 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 InRelease                 
Hit:4 https://download.docker.com/linux/ubuntu jammy InRelease                            
Hit:5 https://download.ni.com/ni-linux-desktop/LabVIEW/2023/Q1/f0/community/deb/ni-labview-2023/jammy jammy InRelease
Hit:6 http://apt.pop-os.org/release jammy InRelease                 
Hit:7 https://download.ni.com/ni-linux-desktop/2023/Q1/deb/ni/jammy jammy InRelease
Hit:8 http://apt.pop-os.org/ubuntu jammy InRelease                  
Hit:9 http://apt.pop-os.org/ubuntu jammy-security InRelease
Get:10 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 Release [3,094 B]
Hit:11 http://apt.pop-os.org/ubuntu jammy-updates InRelease
Hit:12 http://apt.pop-os.org/ubuntu jammy-backports InRelease
Get:13 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 Release.gpg [801 B]
Ign:13 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 Release.gpg
Reading package lists... Done
W: GPG error: https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6A26B1AE64C3C388
E: The repository 'https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 Release' 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.

After executing the following command provided by the guide to import the public key, I noticed that the file /usr/share/keyrings/mongodb-server-6.0.gpg had not been created.

curl -fsSL https://pgp.mongodb.com/server-6.0.pub | sudo gpg -vv -o /usr/share/keyrings/mongodb-server-6.0.gpg

Output:

gpg: WARNING: no command supplied.  Trying to guess what you mean ...
# off=0 ctb=99 tag=6 hlen=3 plen=525
:public key packet:
    version 4, algo 1, created 1645629114, expires 0
    pkey[0]: [4096 bits]
    pkey[1]: [17 bits]
    keyid: 6A26B1AE64C3C388
# off=528 ctb=b4 tag=13 hlen=2 plen=55
:user ID packet: "MongoDB 6.0 Release Signing Key <packaging@mongodb.com>"
# off=585 ctb=89 tag=2 hlen=3 plen=574
:signature packet: algo 1, keyid 6A26B1AE64C3C388
    version 4, created 1645629114, md5len 0, sigclass 0x13
    digest algo 2, begin of digest 00 e1
    hashed subpkt 2 len 4 (sig created 2022-02-23)
    hashed subpkt 27 len 1 (key flags: 03)
    hashed subpkt 9 len 4 (key expires after 5y0d0h0m)
    hashed subpkt 11 len 5 (pref-sym-algos: 9 8 7 3 2)
    hashed subpkt 21 len 5 (pref-hash-algos: 8 2 9 10 11)
    hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
    hashed subpkt 30 len 1 (features: 01)
    hashed subpkt 23 len 1 (keyserver preferences: 80)
    subpkt 16 len 8 (issuer key ID 6A26B1AE64C3C388)
    data: [4096 bits]
pub   rsa4096 2022-02-23 [SC] [expires: 2027-02-22]
      39BD841E4BE5FB195A65400E6A26B1AE64C3C388
uid           MongoDB 6.0 Release Signing Key <packaging@mongodb.com>
sig        6A26B1AE64C3C388 2022-02-23   [selfsig]

How can I resolve this error? Am I importing the public key improperly?

guiverc avatar
cn flag
Only Ubuntu and *official* flavors of Ubuntu (https://ubuntu.com/download/flavours) are on-topic here, refer to https://askubuntu.com/help/on-topic where you'll find other SE sites where you question will be welcome if you don't want to use a Pop forum. (*One advantage of Ubuntu is it's many support options, you opted for Pop OS so take advantage of its support options, or SE Unix & Linux* found in the on-topic link) *Your sources match a Pop OS system, not a Ubuntu OS*
Score:2
au flag

I was able to import the key by executing the following:

curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \
sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/mongodb-server-6.0.gpg

I then updated the list file appropriately:

echo "deb [ arch=amd64,arm64 signed=/etc/apt/trusted.gpg.d/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
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.