当前位置:网站首页>Deepin 编译VirtualBox实录以及编译报错解决
Deepin 编译VirtualBox实录以及编译报错解决
2022-06-09 15:47:00 【djc8小码农】
网上都没有Deepin编译VirtualBox的文章,估计大佬们不屑写,懂的不写,不懂的又不知道咋搞,为此我作为一个半懂不懂的入门新手Linus只能操刀,实战一波,经过一下午的研究,整理出了这篇文章,嗯,应该没毛病了,如果你想编译VirtualBox装逼,但是你又不懂,恭喜你啦,看过这篇文章后,你肯定能玩的贼溜。
这是我为数不多的,非常完整的教程,希望能带给你帮助,如果有转载的,请注明丢节操吧编写,不胜感激!
1.前言
最近在用VirtualBox的时候发现剪切板有问题。
因为是用的深度商店下载的VirtualBox,就感觉是版本不够。然后就想着编译下VirtualBox。
说做就做。这中间遇到了好多次编译报错,通过Google解决了一些。
我目前的版本:lsb_release -a
No LSB modules are available.
Distributor ID:Deepin
Description:Deepin 15.5
Release:15.5
Codename:unstable内核:
uname -r:4.14.0-deepin2-amd64
cat /proc/version : Linux version 4.14.0-deepin2-amd64 ([email protected]) (gcc version 6.3.0 20170321 (Debian 6.3.0-11)) #1 SMP PREEMPT Deepin 4.14.12-2 (2018-01-06)virtualBox提供了linux在线编译文档:https://www.virtualbox.org/wiki/Linux%20build%20instructions
按照文档中Debian的去编译就好了。
2.卸载旧版本的VirtualBox
在启动器上右键卸载就好了 运行
sudo apt-get autoremove --purge virtualbox3.依赖包安装
安装依赖包:
sudo apt-get install gcc g++ bcc iasl xsltproc uuid-dev zlib1g-dev libidl-dev \
libvpx-dev libssl-dev qt5-default g++-multilib qttools5-dev-tools \
libsdl1.2-dev libxcursor-dev libasound2-dev libstdc++5 \
libpulse-dev libxml2-dev libxslt1-dev \
python-dev libqt4-dev qt4-dev-tools libcap-dev \
libxmu-dev mesa-common-dev libglu1-mesa-dev \
linux-kernel-headers libcurl4-openssl-dev libpam0g-dev \
libxrandr-dev libxinerama-dev libqt4-opengl-dev makeself \
libdevmapper-dev default-jdk python-central \
texlive-latex-base \
texlive-latex-extra texlive-latex-recommended \
texlive-fonts-extra texlive-fonts-recommended其中有个libhal-dev,跳过跳过。。。
4.生成env.sh环境变量
然后是生成环境变量env.sh
cd 到下载的源码目录,比如我的VirtualBox-5.2.12
执行:./configure --disable-hardening
等一会,如果这中间有报错,比如:说啥没找到,那么要记住,要去:源码包的目录下,找到configure.log来看具体的错误
一般都是包不存在,比如:"sys/cdefs.h: No such file or directory"
"QtGlobal: No such file or directory"
之类的
针对这些错误具体再去sudo apt-get install xxx
即可。
之后执行:source ./env.sh
5.编译
执行kmk all
漫长的等待。。。。
6.编译内核
cd out/linux.amd64/release/bin/src
具体是linux.amd64还是其他,在kmk all编译结束后,可以看到make的路径
执行:sudo make
执行:sudo make install
赋予权限:sudo chmod +rw /dev/vboxdrv
不然就会报错:
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
7.运行
如果现在还没有啥报错,恭喜你啦,成功编译了VirtualBox Gui以及内核啦
现在可以通过命令行使用 ./VirtualBox 来运行啦
如果你的虚拟机之前以及安装了USB3.0的扩展包,那现在也要安装下才能RUN虚拟机。
具体可以打开VirtualBox Gui界面进行安装,这里不再赘述,可参见:https://www.virtualbox.org/manual/ch01.html#intro-installing
8.参考内容
边栏推荐
- Practice of flask apscheduler stepping on pits
- May training (day 27) - figure
- Moonriver Network与Calamari Network完成XCM集成
- LeetCode 6076. 表示一个折线图的最少线段数
- R语言plotly可视化:plotly可视化二维直方图等高线图、使用子图的方式在二维直方图等高线图的顶部和右侧添加两个变量的边缘直方图(2D Histogram Contour Subplot)
- IdentityServer4 入门之一/之二
- Dapr source code analysis | project overview
- How does the memory database give full play to its memory advantage?
- June training (day 03) - sorting
- Golang reflect: code examples for reflecting (obtaining values) basic data types and struct structures
猜你喜欢

记一次可怜的150元RCE平安Src挖掘

The demand for data storage is increasingly diversified, and it is a general trend to divide and conquer

My Lord, times have changed...

Medical device supply chain collaborative management system: commercial digital upgrade, data-driven supply chain efficient collaboration

≥3.5寸液晶屏的会议控制键盘说明书

Data security is urgent. What is the significance of the first SOC 2 authentication report for domestic intelligent manufacturers?

还在从零开始搭建项目?这款升级版快速开发脚手架值得一试~

接口测试系列——AutoDiff流量回放在集成测试中的实践应用

The demand for data storage is increasingly diversified, and it is a general trend to divide and conquer

Nth child selector
随机推荐
Build an integrated intelligent dialogue analysis platform from intelligent quality inspection to dialogue analysis, and the customer service center of Bank of Hangzhou creates a new business card of
Live broadcast preview | a new era of social interaction, exploring new social experiences in the universe
The aquatic industry digital B2B e-commerce platform realizes fine management and drives enterprise performance growth
一个时代的终结!吴恩达经典《机器学习》课程本月关闭注册...然而
Moonriver Network与Calamari Network完成XCM集成
技术 - 中台
Example of rewriting the decomposition of cublas Lu into cublas matinv
容器和镜像的区别
May training (day 23) - dictionary tree
中途离开电脑怎么一键锁屏
64 interface appearance (window without border, irregular form, transparent form)
六月集训(第01天) —— 数组
五月集训(第26天) —— 并查集
微信小程序 思维导图
JWT思维导图
May training (day 31) - status compression
May training (day 22) - orderly gathering
LeetCode 327. 区间和的个数
六月集训(第03天) —— 排序
The interviewer asked me how many locks were added to an update statement? I summarized the whole eight part essay