12.04 VIM 无法安装问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
Him_12
帖子: 5
注册时间: 2017-07-14 20:53
系统: ubuntu12.04

12.04 VIM 无法安装问题

#1

帖子 Him_12 » 2017-07-14 20:59

系统12.04 无法安装VIM

sudo apt-get install vim 还是报错

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package vim 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' has no installation candidate

百度搜寻后用sudo apt-get update && sudo apt-get install vim还是一样的结果

Err http://security.ubuntu.com precise-security InRelease

Err http://security.ubuntu.com precise-security Release.gpg
Could not resolve 'security.ubuntu.com'
Err http://us.archive.ubuntu.com precise InRelease

Err http://us.archive.ubuntu.com precise-updates InRelease

Err http://us.archive.ubuntu.com precise-backports InRelease

Err http://us.archive.ubuntu.com precise Release.gpg
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com precise-updates Release.gpg
Could not resolve 'us.archive.ubuntu.com'
Err http://us.archive.ubuntu.com precise-backports Release.gpg
Could not resolve 'us.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dis ... /InRelease

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dis ... /InRelease

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dis ... /InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists ... /InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists ... elease.gpg Could not resolve 'security.ubuntu.com'

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dis ... elease.gpg Could not resolve 'us.archive.ubuntu.com'

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dis ... elease.gpg Could not resolve 'us.archive.ubuntu.com'

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dis ... elease.gpg Could not resolve 'us.archive.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package vim 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' has no installation candidate


这个怎么解决啊?
Him_12
帖子: 5
注册时间: 2017-07-14 20:53
系统: ubuntu12.04

Re: 12.04 VIM 无法安装问题

#2

帖子 Him_12 » 2017-07-14 21:35

我换了好几个源 发现都不能用 包括163的

现在发现我的ubentu 不能上网 是不是因为无法联网不能更新啊

我ping 之后 connect: Network is unreachable

也是网上找的
ubuntu@ubuntu-virtual-machine:~$ ^C
ubuntu@ubuntu-virtual-machine:~$ $sudo ifconfig etho 192.168.1.1 netmask 255.255.255.0
SIOCSIFADDR: Permission denied
etho: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: Permission denied

怎么配置啊
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 12.04 VIM 无法安装问题

#3

帖子 vickycq » 2017-07-14 21:46

能上网吗?
执行以下指令将结果全部复制贴上来

代码: 全选

uname -a
cat /etc/issue
cat /sys/class/dmi/id/{sys_vendor,product_name}
sudo lshw -C net
sudo ifconfig -a
ls -l /etc/resolv.conf
cat /etc/resolv.conf
ping -c2 114.114.114.114
ping -c2 www.sohu.com
wget http://mirrors.ustc.edu.cn/ubuntu/dists/precise/Release
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
Him_12
帖子: 5
注册时间: 2017-07-14 20:53
系统: ubuntu12.04

Re: 12.04 VIM 无法安装问题

#4

帖子 Him_12 » 2017-07-15 3:58

我自己已经弄好了

按照网上的Ubuntu设置还是不行 最后我在虚拟机的‘编辑选项’里虚拟网络编辑器 上 我有三个选项VMnet0 VMnet1和VMnet8

那个VMnet0 是桥接的 我直接给删掉了 就可以上网 具体是什么原因我也不清楚

我的虚拟机安装Ubuntu的时候全部都是默认设置的

不过还是谢谢你了 :em11 有问题我在上面吧
回复