当前位置:   article > 正文

关于Ubuntu16.04下安装VMwareTools失败,未发现软件包open-vm-dkms,open-vm-tools问题解决_无法定位软件包 open-vm-dkms

无法定位软件包 open-vm-dkms

问题描述

1.某天我在用VMwareTools拖拽文件到主机桌面时,每次复制到一半就卡死了,之后虚拟机卡死,只能重启才行
2.在尝试n种方法无果之后,我决定卸载VMwareTools重新安装,使用共享文件夹方式传输文件

开始重装

  1. 看到官方支持的新命令,抛弃以往复杂的安装方式,只需要一行代码就能搞定
sudo apt-get install open-vm-tools open-vm-tools-desktop  open-vm-dkms
  • 1
  1. 在命令行输入回车之后
    E: 未发现软件包open-vm-dkms
    E: 无法定位软件包 open-vm-dkms
    然后查百度,输入
sudo apt-get update
  • 1

然而并没有什么X用!!!
报错显示

W: Some index files failed to download. They have been ignored, or old ones used instead.
  • 1
  1. 百度了很多方法最后我决定换阿里云的源!!
    首先将/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


  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36

先复制好内容
vi linux命令行用d键删除行,用滚轮中键或shift+Insert来粘贴内容

  1. 重新配置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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  1. 网上看见将那些第三方的软件更新全部勾去也不知道这条管用不,先写上吧233333
  2. 之后再运行sudo apt-get update 就成功啦!
sudo apt-get update
#还有这句不要忘了
sudo apt-get upgrade
  • 1
  • 2
  • 3
  1. 运行sudo apt-get install open-vm-tools open-vm-tools-desktop open-vm-dkms成功安装VMwareTools
  2. 输入sudo reboot重新启动即可使用VMwareTools

参考链接:
https://blog.csdn.net/qq_40155090/article/details/79580557
http://blog.sina.com.cn/s/blog_b953bc190102xe3j.html
PS:如果有那个大神知道我开头传文件卡死的问题麻烦告知一下QWQ

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/843387
推荐阅读
相关标签
  

闽ICP备14008679号