package-name : Depends: required-package but it is not going to be installed
复制代码
# 尝试修复依赖关系
sudo apt install -f
# 清理软件包缓存
sudo apt clean
sudo apt autoclean
# 重新配置软件包
sudo dpkg --configure -a
# 如果问题仍然存在,可以尝试使用aptitude
sudo apt install aptitude
sudo aptitude install package-name
复制代码
2. GPG错误
在更新软件包列表时,可能会遇到GPG错误,如:
W: GPG error: http://repository.example.com debian Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1234567890ABCDEF