Ubuntu16中vim安裝出錯–has no installation candidate的解決方法

Kbytes發表於2017-08-27

Ubuntu16中vim安裝出錯–has no installation candidate的解決方法

問題:
輸入sudo apt-get install vim 出現以下文字:
apt-get install
Reading package lists… Done
Building dependency tree… Done
Package aptitude is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package has no installation candidate

嘗試著網上的主流兩種方法均未成功,放上來僅作參考
1. 解決Ubuntu 安裝vim 的Package vim has no installation candidate問題,100%有效 ,由於找不到sourses.list檔案故放棄此方法。
2. Ubuntu 出現apt-get: Package has no installation candidate問題 , 安裝檔案不是vim,但都是安裝軟體。全部按部就班執行,最後安裝VIM還是不行。

解決方案:

sudo rm -r /var/lib/apt/lists/*
sudo apt-get update
sudo apt-get install vim

相關文章