新版博客SEO优化基本完成,新老博客内容正在整合中,保证每篇文章高质量。 SiteMap RSS Github
Linux 问题记录
嘉美伯爵   2019年10月4日 14:43   Linux   Centos Ubuntu Debian   45  

Debian: Some packages could not be installed

这个问题在于未正确配置sources.list源

  • 安装
# vi /etc/apt/sources.list

deb https://mirrors.ustc.edu.cn/debian stretch main contrib non-free
#deb-src http://httpredir.debian.org/debian stretch main contrib non-free

deb https://mirrors.ustc.edu.cn/debian stretch-updates main contrib non-free
#deb-src http://httpredir.debian.org/debian stretch-updates main contrib non-free

deb https://mirrors.ustc.edu.cn/debian stretch-backports main contrib non-free
#deb-src http://httpredir.debian.org/debian stretch-backports main contrib non-free

deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contribnon-free
#deb-src http://security.debian.org/ stretch/updates main contrib non-free
  • 注册
# The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CF63AD3F06FC659
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys NO_PUBKEY(可能有多个)
  • 更新
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
  • 配置
# E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 
dpkg --configure -a/dpkg --reconfigure -a