我试图按照 lutris 的 apt 说明进行操作,但它们显然只适用于 debian,而我搞乱了 ubuntu 的 apt 密钥,所以其他任何东西都无法更新
我使用了以下命令
echo "deb [signed-by=/etc/apt/keyrings/lutris.gpg] https://download.opensuse.org/repositories/home:/strycore/Debian_12/ ./" | sudo tee /etc/apt/sources.list.d/lutris.list > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/lutris.gpg] https://download.opensuse.org/repositories/home:/strycore/Debian_12/ ./" | sudo tee /etc/apt/sources.list.d/lutris.list > /dev/null
sudo apt update
我收到的错误是
Get:1 http://gb.archive.ubuntu.com/ubuntu noble InRelease [256 kB]
Get:2 https://download.docker.com/linux/ubuntu noble InRelease [48.8 kB]
0% [Waiting for headers] [Connecting to security.ubuntu.com (91.189.91.82)]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:2 https://download.docker.com/linux/ubuntu noble InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Get:3 http://gb.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
0% [Waiting for headers] [Connecting to security.ubuntu.com (91.189.91.82)]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:1 http://gb.archive.ubuntu.com/ubuntu noble InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Get:4 http://gb.archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:5 https://ppa.launchpadcontent.net/maveonair/helix-editor/ubuntu noble InRelease [17.8 kB]
0% [Connecting to security.ubuntu.com (91.189.91.82)]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:3 http://gb.archive.ubuntu.com/ubuntu noble-updates InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Get:6 https://ppa.launchpadcontent.net/mozillacorp/mozillavpn/ubuntu noble InRelease [17.8 kB]
0% [Connecting to security.ubuntu.com (91.189.91.82)]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:4 http://gb.archive.ubuntu.com/ubuntu noble-backports InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
0% [Waiting for headers]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:5 https://ppa.launchpadcontent.net/maveonair/helix-editor/ubuntu noble InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
0% [Waiting for headers]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:6 https://ppa.launchpadcontent.net/mozillacorp/mozillavpn/ubuntu noble InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Get:7 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
0% [Working]/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
/usr/bin/apt-key: 95: cannot create /dev/null: Permission denied
E: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Err:7 http://security.ubuntu.com/ubuntu noble-security InRelease
gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
Reading package lists... Done
W: GPG error: https://download.docker.com/linux/ubuntu noble InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'https://download.docker.com/linux/ubuntu noble 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.
W: GPG error: http://gb.archive.ubuntu.com/ubuntu noble InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://gb.archive.ubuntu.com/ubuntu noble 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.
W: GPG error: http://gb.archive.ubuntu.com/ubuntu noble-updates InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://gb.archive.ubuntu.com/ubuntu noble-updates 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.
W: GPG error: http://gb.archive.ubuntu.com/ubuntu noble-backports InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://gb.archive.ubuntu.com/ubuntu noble-backports 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.
W: GPG error: https://ppa.launchpadcontent.net/maveonair/helix-editor/ubuntu noble InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'https://ppa.launchpadcontent.net/maveonair/helix-editor/ubuntu noble 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.
W: GPG error: https://ppa.launchpadcontent.net/mozillacorp/mozillavpn/ubuntu noble InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'https://ppa.launchpadcontent.net/mozillacorp/mozillavpn/ubuntu noble 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.
W: GPG error: http://security.ubuntu.com/ubuntu noble-security InRelease: gpgv, gpgv2 or gpgv1 required for verification, but neither seems installed
E: The repository 'http://security.ubuntu.com/ubuntu noble-security 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.
我尝试了以下方法来修复它,但没有效果,所以我撤消了它
sudo cp -a /var/lib/apt/lists /tmp
sudo rm -r /var/lib/apt/lists/*
有没有办法为 apt 重新生成所需的 gpg 密钥?
编辑:回复@organic-marble如下:
这是来自history
6413 hx
6414 top # end of last session
6415 echo "deb [signed-by=/etc/apt/keyrings/lutris.gpg] https://download.opensuse.org/repositories/home:/strycore/Debian_12/ ./" | sudo tee /etc/apt/sources.list.d/lutris.list > /dev/null
6416 sudo apt update # this is where the error first occurred
6417 ll /etc/apt/sources.list.d/
6418 sudo rm /etc/apt/sources.list.d/lutris.list
6419 sudo hx /etc/apt/sources.list.d/ubuntu.sources
6420 sudo apt update
6421 sudo apt install gpgv
6422 sudo apt install gpg
6423 sudo apt update
6424 cat /etc/apt/sources.list
6425 cat /etc/apt/sources.list.d/ubuntu.sources
...
我检查/dev/null
了以下内容,但可能没有定论
sudo cat test.txt > /dev/null
以下是@steeldriver 的请求
➜ ~ ls -l /dev/null
crw-rw----+ 1 root plugdev 1, 3 Aug 31 15:13 /dev/null
➜ ~ findmnt -T /dev/null
TARGET
SOURCE
FSTYPE OPTIONS
/dev udev devtmpfs rw,nosuid,relatime,size=32815052k,nr_inodes=8203763,mode=755,inode64