歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> 解決Ubuntu 安裝vim 的Package vim has no installation candidate問題,100%有效

解決Ubuntu 安裝vim 的Package vim has no installation candidate問題,100%有效

日期:2017/3/3 14:09:10   编辑:Linux技術
當輸入sudo apt-get install vim-gtk時
出現了下面問題:
nigel@yq-ubuntu:~/worksp$ sudo apt-get install vim-gtk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package vim-gtk 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 'vim-gtk' has no installation candidate
解決辦法就是修改軟件源設置
1.備份源文件,cp -i /etc/apt/sources.list /etc/apt/sources.list_backup
2.打開sources.list,root@ubuntu:/etc/apt# gedit sources.list
3.在源文件中加入如下阿裡巴巴的阿裡雲服務器的地址並保存。(當然也可以是其他公司的地址)
deb
http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src
http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
4.更新:apt-get
update
5.更新後,再安裝vim,sudo
apt-get install vim
這樣問題就解決了。
Copyright © Linux教程網 All Rights Reserved