我正在运行 Ubuntu 22.04,并尝试按照说明安装 UniFi 网络服务器这里。
root@orac:/home/mike# sudo apt-get update && sudo apt-get install ca-certificates apt-transport-https
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:4 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Hit:5 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease
Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease
Fetched 1,604 B in 3s (508 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20230311ubuntu0.22.04.1).
ca-certificates set to manually installed.
The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 1,510 B of archives.
After this operation, 170 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://nz.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 apt-transport-https all 2.4.11 [1,510 B]
Fetched 1,510 B in 0s (4,899 B/s)
Requesting to save current system state
Successfully saved as "autozsys_pl49je"
Selecting previously unselected package apt-transport-https.
(Reading database ... 447867 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.4.11_all.deb ...
Unpacking apt-transport-https (2.4.11) ...
Setting up apt-transport-https (2.4.11) ...
ZSys is adding automatic system snapshot to GRUB menu
root@orac:/home/mike# echo 'deb [ arch=amd64,arm64 ] https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
deb [ arch=amd64,arm64 ] https://www.ui.com/downloads/unifi/debian stable ubiquiti
root@orac:/home/mike# sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
--2023-12-11 16:46:44-- https://dl.ui.com/unifi/unifi-repo.gpg
Resolving dl.ui.com (dl.ui.com)... 65.9.142.121
Connecting to dl.ui.com (dl.ui.com)|65.9.142.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1196 (1.2K)
Saving to: ‘/etc/apt/trusted.gpg.d/unifi-repo.gpg’
/etc/apt/trusted.gp 100%[===================>] 1.17K --.-KB/s in 0s
2023-12-11 16:46:44 (1.47 GB/s) - ‘/etc/apt/trusted.gpg.d/unifi-repo.gpg’ saved [1196/1196]
root@orac:/home/mike# wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
root@orac:/home/mike# echo "deb https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
deb https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 multiverse
root@orac:/home/mike# sudo apt-get update
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease
Ign:4 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 InRelease
Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:6 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release [2,495 B]
Get:7 https://dl.ui.com/unifi/debian stable InRelease [2,292 B]
Get:8 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg [801 B]
Ign:8 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg
Get:9 https://dl.ui.com/unifi/debian stable/ubiquiti amd64 Packages [714 B]
Get:10 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Get:11 https://dl.ui.com/unifi/debian stable/ubiquiti arm64 Packages [714 B]
Hit:12 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease
Reading package lists... Done
W: https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: GPG error: https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
E: The repository 'https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 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.
root@orac:/home/mike# sudo apt-get update && sudo apt-get install unifi -y
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 https://dl.ui.com/unifi/debian stable InRelease
Ign:5 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 InRelease
Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release [2,495 B]
Get:8 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Get:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg [801 B]
Hit:10 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease
Ign:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg
Reading package lists... Done
W: https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: GPG error: https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
E: The repository 'https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 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.
root@orac:/home/mike# sudo service unifi status
Unit unifi.service could not be found.
有谁知道如何解决这一问题?
我认为这与此有关:
root@orac:/home/mike# apt update
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 https://dl.ui.com/unifi/debian stable InRelease
Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
Ign:6 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 InRelease
Get:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release [2,495 B]
Get:8 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Get:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg [801 B]
Ign:9 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg
Hit:10 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease
Reading package lists... Done
W: https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: GPG error: https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
E: The repository 'https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 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.
为什么说签名无效?
我尝试过解决方案这里:
mike@orac:~$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 58712A2291FA4AD5
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.pKHz7AaGfL/gpg.1.sh --keyserver keys.gnupg.net --recv-keys 58712A2291FA4AD5
gpg: keyserver receive failed: Server indicated a failure
还尝试了评论部分指出的解决方案:
mike@orac:~$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 58712A2291FA4AD5
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.umOksSwsow/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 58712A2291FA4AD5
gpg: key 58712A2291FA4AD5: "MongoDB 3.6 Release Signing Key <[email protected]>" 1 new signature
gpg: Total number processed: 1
gpg: new signatures: 1
mike@orac:~$ sudo apt update
Hit:1 http://nz.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://nz.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 https://dl.ui.com/unifi/debian stable InRelease
Ign:5 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 InRelease
Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:7 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release [2,495 B]
Get:8 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg [801 B]
Get:9 https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_22.04 ./ InRelease [1,604 B]
Hit:10 https://ppa.launchpadcontent.net/yannubuntu/boot-repair/ubuntu jammy InRelease
Ign:8 https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release.gpg
Reading package lists... Done
W: https://repo.mongodb.org/apt/ubuntu/dists/bionic/mongodb-org/3.6/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: GPG error: https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
E: The repository 'https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 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.
答案1
为什么说签名无效?
您正在尝试按照输出将 Ubuntu 18.x 组件安装到 Ubuntu 22.x 中:
https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 Release: The following signatures were invalid: EXPKEYSIG 58712A2291FA4AD5 MongoDB 3.6 Release Signing Key <[email protected]>
您需要使用 Ubuntu 22.x repo 来安装 mongodb,而不是 Ubuntu 18.x
此外,在其他地方进行过类似的 UniFi 网络服务器安装练习,在 Ubuntu 上安装 UniFi 网络服务器存在问题。解决方案是使用纯 Debian 12 无头服务器,然后按照 UniFi 论坛使用“glennr.nl”脚本在 Debian 上正确安装软件。
答案2
Ubuntu 上的密钥似乎已于 2023 年 12 月 9 日过期密钥服务器对于 Mongo 3.6,
sig 58712a2291fa4ad5 2018-12-10T16:51:38Z 2023-12-09T16:51:02Z