1.去官网下载deb包,例如包名:

virtualbox-.2_5.2.18-124319_Debian_stretch_amd64.deb

2.安装

sudo dpkg -i virtualbox-.2_5.2.18-124319_Debian_stretch_amd64.deb

3.可能会出现如下问题:

root@debian:/home/kevin/下载# dpkg -i virtualbox-.2_5.2.18-124319_Debian_stretch_amd64.deb
(正在读取数据库 ... 系统当前共安装有 个文件和目录。)
正准备解包 virtualbox-.2_5.2.18-124319_Debian_stretch_amd64.deb ...
正在将 virtualbox-5.2 (5.2.-~Debian~stretch) 解包到 (5.2.-~Debian~stretch) 上 ...
正在设置 virtualbox-5.2 (5.2.-~Debian~stretch) ...
addgroup: 组"vboxusers"已经是系统组。退出。
Created symlink /etc/systemd/system/multi-user.target.wants/vboxdrv.service → /lib/systemd/system/vboxdrv.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxballoonctrl-service.service → /lib/systemd/system/vboxballoonctrl-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxautostart-service.service → /lib/systemd/system/vboxautostart-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb-service.service → /lib/systemd/system/vboxweb-service.service.
This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
linux-headers-amd64 linux-headers-4.9.0-8-amd64
This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
linux-headers-amd64 linux-headers-4.9.--amd64 There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root.
正在处理用于 systemd (-+deb9u4) 的触发器 ...
正在处理用于 mime-support (3.60) 的触发器 ...
正在处理用于 hicolor-icon-theme (0.15-) 的触发器 ...
正在处理用于 shared-mime-info (1.8-+deb9u1) 的触发器 ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'

上面已经提示我们缺少gcc make perl 包,linux的内核头文件:linux-headers-amd64 linux-headers-4.9.0-8-amd64

我们只需要安装即可:

sudo apt-get install gcc
sudo apt-get install make
sudo apt-get install perl
sudo apt-get install linux-headers-amd64
sudo apt-get install linux-headers-4.9.--amd64

最后执行:

sudo /sbin/vboxconfig

至此Virtual Box应该无大问题。

另外Virtual Box还有USB的拓展包可以去官网查看安装。

最新文章

  1. charing animation
  2. XML文件(1)--使用DOM示例
  3. 一道经典JS题(关于this)
  4. office openxml学习(一)
  5. Linux访问Windows磁盘实现共享
  6. 让Hibernate生成的DDL脚本自动增加注释
  7. gcc基本用法
  8. cxf2.7.10与Spring3.0.5集成时报错如下
  9. IPv4头部结构具体解释
  10. HDU 4869 Turn the pokers(推理)
  11. 01-Git简介和仓库创建
  12. Spring Cloud微服务系列文,Hystrix与Eureka的整合
  13. 一文教你看懂大数据的技术生态圈:Hadoop,hive,spark
  14. springMVC工作过程
  15. python functiontools模块中的 wraps
  16. 前端性能优化成神之路—资源合并与压缩减少HTTP请求
  17. Unity 3D光源-Directional平行光/逆光效果,光晕详解、教程
  18. net框架平台下RPC框架选型
  19. oop(Object Oriented Programming)
  20. Docker入门讲解

热门文章

  1. HDU1527 - 取石子游戏【威佐夫博弈】
  2. BZOJ 1901 Dynamic Rankings (整体二分+树状数组)
  3. 洛谷—— P1189 SEARCH
  4. Ubuntu16.04添加源的地址
  5. iOS中的crash防护(二)KVC造成的crash
  6. [Angular] Upgrade existing Angular app to Progressive Web App
  7. 【iOS开发系列】XIB IBOutlets use strong or weak ?
  8. 第6章7节《MonkeyRunner源代码剖析》Monkey原理分析-事件源-事件源概览-注入按键事件实例
  9. 杂项-公司:Altera
  10. 一个Python项目的创建架构