vm--ubuntu16--64bit安装vim

本文介绍了当遇到E: Package 'vim-gtk' has no installation candidate错误时的解决方法,通过更换阿里云源并调整依赖关系成功安装了vim-gtk。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

首先E: Package 'vim-gtk' has no installation candidate,出现的是这个问题

解决办法是:

更改源。或者添加源,阿里云

备份源文件cp -i /etc/apt/sources.list /etc/apt/sources.list_backup

然后打开source.list                               gedit sources.list

然后加入deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

然后更新apt-get update

然后apt-get upgrade

在apt-get install vim-gtk

之后出现了这个问题



The following packages have unmet dependencies:
 vim-gtk : Depends: vim-common (= 2:7.4.052-1ubuntu3.1) but it is not going to be installed
           Depends: libperl5.18 (>= 5.18.2) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

 vim-common, libperl5.18全部移除以后再安装就行了

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值