All packages are up to date. W: http://mirrors.aliyun.com/ubuntu/dists/bionic/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. W: http://mirrors.aliyun.com/ubuntu/dists/bionic-security/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. W: http://mirrors.aliyun.com/ubuntu/dists/bionic-updates/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. W: http://mirrors.aliyun.com/ubuntu/dists/bionic-proposed/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. W: http://mirrors.aliyun.com/ubuntu/dists/bionic-backports/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
时间: 2023-10-23 14:08:35 浏览: 361
解决git:fatal:Unable to create”…/.git/index.lock” 的错误
这些警告是由于使用Aliyun镜像源进行Ubuntu软件包更新时出现的。尽管警告信息出现,但它们并不表示软件包没有更新。你可以继续使用已经更新的软件包,而不会产生任何问题。警告信息只是在提醒你使用了不再推荐的apt-key命令进行验证。
如果你对警告信息感到不安,你可以考虑更换其他镜像源或手动更新公钥。以下是手动更新公钥的步骤:
1. 打开终端,输入以下命令以备份旧的trusted.gpg文件:
```
sudo mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.backup
```
2. 创建一个新的trusted.gpg文件:
```
sudo touch /etc/apt/trusted.gpg
```
3. 使用wget命令下载Aliyun的公钥文件:
```
sudo wget http://mirrors.aliyun.com/ubuntu/project/ubuntu-archive-keyring.gpg -O /etc/apt/trusted.gpg.d/ubuntu-archive-keyring.gpg
```
4. 更新APT软件包列表:
```
sudo apt update
```
请注意,这些警告信息并不会影响你正常使用已更新的软件包。如果你还有其他问题,请随时提问。
阅读全文