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