Ubuntu14.04安装Virtualbox虚拟机以及安装Win7后文件共享总结

https://blog.csdn.net/ThomasCai001/article/details/52945222

本文参考以下链接,感谢原作者!
http://jingyan.baidu.com/article/eae07827856ac21fed54856f.html
http://jingyan.baidu.com/article/20b68a88bb2f78796cec6233.html
http://laokaddk.blog.51cto.com/368606/1241957

本文旨在做个记录方便以后自己在次操作又得去网上找资料,干脆都写在这里!

一、ubuntu14.04安装virtualbox虚拟机
1、官网下载:https://www.virtualbox.org/wiki/Downloads
这里写图片描述
2、安装virtualbox
(1)cd 到下载目录 比如如果下载到Downloads : cd Downloads
安装命令:(后面的.deb文件名改为你下载的文件名)

sudo dpkg -i virtualbox-5.0_5.0.2-102096~Ubuntu~trusty_amd64.deb
  • 1

(2)此命令不能解决包依赖关系,安装中可能会报错。
这里写图片描述
解决方法一、打开Ubuntu软件中心来修复
这里写图片描述
点击“Repair”来修复,然后需输入密码,修复完成即安装完成。
方法二:通过以下命令来修复:

sudo apt-get -f install
  • 1

这里写图片描述

二、ubuntu与虚拟机下的win7共享操作:(这里放几张图片,应该很清楚。)
这里写图片描述
这里写图片描述
这里写图片描述
这里写图片描述
这里写图片描述
注:上面这一步win7 右击网络 点击映射网络驱动器。
这里写图片描述

三、复制粘贴共享问题:
在VirtualBox中“设备”–>“共享粘贴板”–>“双向”

四、更新失败

会提示--解析“ubuntu.cn99.com:http”时,出现了某些故障(-5 - 没有与主机名关联的地址)

这时候可以考虑更新一下软件源,软件源设置的路径和对应的文件:

/etc/apt/source.list

可以用如下的方式进行覆盖,覆盖完以后千万几个要更新一下源:

执行如下的指令:

sudo apt-get update

----------------------------------------------------------------------如下是具体的source文件----------------------------------------------------------------

# deb cdrom:[Ubuntu 14.04.5 LTS _Trusty Tahr_ - Release amd64 (20160803)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial universe
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb https://download.virtualbox.org/virtualbox/debian xenial contrib

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main
deb [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu trusty stable

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值