解决Ubuntu17.04不能安装git的问题 E: Package 'git' has no installation candidate
解決Ubuntu17.04不能安裝git的問題 E: Package 'git' has no installation candidate
? ? 在Ubuntu系統(tǒng)中安裝git的命令是:sudo apt install git,但比較奇怪的是,在Ubuntu17.04中輸入該命令,卻出現(xiàn)以下的情況:
Reading package lists... Done
Building dependency tree? ? ? ?
Reading state information... Done
Package git 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 'git' has no installation candidate
? ? 沒有找到對應(yīng)軟件包'git',Why?以為沒有update,但輸入apt-get update,還是出現(xiàn)這種問題。后來,發(fā)現(xiàn)是更改一下Install的源地址就可以了,方法是:在System settings->software&Updates,勾選“Source code”,在Download from選擇other
oftware&Updates,勾選“Source code”,在Download from選擇other
點擊選擇“select Best Server”會自動選擇網(wǎng)絡(luò)最好的服務(wù)器,當(dāng)然或者選擇mirror.aliyun.com等國內(nèi)鏡像服務(wù)器下載。
然后Choose Server->Close->Reload即可,最后再次輸入“sudo apt install git”就可以正常安裝git了
總結(jié)
以上是生活随笔為你收集整理的解决Ubuntu17.04不能安装git的问题 E: Package 'git' has no installation candidate的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OpenCV调用TensorFlow预训
- 下一篇: 解决Ubuntu Pycharm无法输入