问题描述
1.某天我在用VMwareTools拖拽文件到主机桌面时,每次复制到一半就卡死了,之后虚拟机卡死,只能重启才行
2.在尝试n种方法无果之后,我决定卸载VMwareTools重新安装,使用共享文件夹方式传输文件
开始重装
- 看到官方支持的新命令,抛弃以往复杂的安装方式,只需要一行代码就能搞定
sudo apt-get install open-vm-tools open-vm-tools-desktop open-vm-dkms
- 在命令行输入回车之后
E: 未发现软件包open-vm-dkms
E: 无法定位软件包 open-vm-dkms
然后查百度,输入
sudo apt-get update
然而并没有什么X用!!!
报错显示
W: Some index files failed to download. They have been ignored, or old ones used instead.
- 百度了很多方法最后我决定换阿里云的源!!
首先将/var/lib/apt/lists 的文件备份一下
mkdir /var/lib/apt/list
cp -r /var/lib/apt/lists/* /var/lib/apt/list
然后删除/var/lib/apt/lists/文件夹下所有的文件
sudo rm -rf /var/lib/apt/lists/*
然后 打开/etc/apt/sources.list (emacs/vi/vim都可以用)
将里面的内容都删掉,替换成阿里云的源
因为换了几个源都发现还是会出现
index files failed to download的错误
所以我用了网上的几个源组合在一起
#deb包
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 更新的源的内容
# deb http://mirrors.aliyun.com/ubuntu/ raring main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ raring-security main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ raring-updates main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ raring-proposed main restricted universe multiverse
# deb http://mirrors.aliyun.com/ubuntu/ raring-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ raring main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ raring-security main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ raring-updates main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ raring-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ raring-backports main restricted universe multiverse
先复制好内容
vi linux命令行用d键删除行,用滚轮中键或shift+Insert来粘贴内容
- 重新配置DNS;
sudo emacs/vi /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 114.114.114.114
naemserver 8.8.8.8
#阿里的DNS
nameserver 223.5.5.5
nameserver 223.6.6.6
- 网上看见将那些第三方的软件更新全部勾去也不知道这条管用不,先写上吧233333
- 之后再运行sudo apt-get update 就成功啦!
sudo apt-get update
#还有这句不要忘了
sudo apt-get upgrade
- 运行sudo apt-get install open-vm-tools open-vm-tools-desktop open-vm-dkms成功安装VMwareTools
- 输入sudo reboot重新启动即可使用VMwareTools
参考链接:
https://blog.csdn.net/qq_40155090/article/details/79580557
http://blog.sina.com.cn/s/blog_b953bc190102xe3j.html
PS:如果有那个大神知道我开头传文件卡死的问题麻烦告知一下QWQ
来源:oschina
链接:https://my.oschina.net/u/4257871/blog/4782953