E: Package xxx has no installation candidate成功解決

  • 2020 年 12 月 6 日
  • 筆記

E: Package 'php5' has no installation candidate 問題

分析

首先這個問題的最主要的原因就是因為當前Linux系統的下載源中找不到相應的文件,所以說我們需要更新下載源

步驟

找到記錄著下載源地址的文件

vi /etc/apt/sources.list

在下載源中添加源

deb //mirrors.ustc.edu.cn/debian stable main contrib non-free
# deb-src //mirrors.ustc.edu.cn/debian stable main contrib non-free
deb //mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
# deb-src //mirrors.ustc.edu.cn/debian stable-updates main contrib non-free

# deb //mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
# deb-src //mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free

修改完全後,執行apt-get update``apt-get upgrade更新一下,然後再次執行apt-get install

Tags: