Ubuntu中源码编译Virtualbox

本文详细介绍了在Ubuntu12.04环境下使用Virtualbox源码进行编译时遇到的问题及解决方案。包括创建libXTrap.so的软链接、解决checkUndefined.sh错误、配置JDK路径、解决jni.h找不到问题和解决编译tex文件时的错误。通过遵循指南和调整配置文件,最终成功解决了编译过程中遇到的各种问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

环境: Ubuntu 12.04 (64 bits), Virtualbox 4.2.8源码

首先从https://www.virtualbox.org/wiki/Downloads下载Virtualbox源代码,其官方Wiki上还提供了编译指导:https://www.virtualbox.org/wiki/Linux%20build%20instructions。总体上按指导上一步步来就行,但实际操作中总还是会碰到问题的,下面总结一下:

1. 指导中提到要创建libXTrap.so的软链接,但Ubuntu中压根没有这个文件。根据https://forums.virtualbox.org/viewtopic.php?f=10&t=52734,不用去管它。


2. /home/zjin/source/VirtualBox-4.2.8/src/bldprogs/checkUndefined.sh: following symbols not defined in the files xxx:
__realpath_chk __memcpy_chk __sprintf_chk

根据https://forums.virtualbox.org/viewtopic.php?f=10&t=54337,创建LocalConfig.kmk,内容为

VBOX_JAVA_HOME := /usr/lib/jvm/java-6-openjdk
VBOX_WITH_WARNINGS_AS_ERRORS :=
VBOX_WITH_TESTCASES :=
VBOX_WITH_TESTSUITE := 

3. jni.h: No such file or directory

LocalConfig.kmk中JDK路径没设好,确保VBOX_JAVA_HOME路径下有include/jni.h。


4. 编译tex文件时出错:

! I can't find file `bchr8t'.
<*> ...:=ljfour; mag:=1; nonstopmode; input bchr8t
                                                  
Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1; nonstopmode; input bchr8t
                                                  
Transcript written on mfput.log.

! I can't find file `bchr8t'.
<*> ...:=ljfour; mag:=1; nonstopmode; input bchr8t
                                                  
Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1; nonstopmode; input bchr8t

根据http://michail.flouris.net/2010/07/using-the-tkiz-package-in-latex-on-rhel5-centos-fc-and-ubuntu-linux/,

$ sudo apt-get install texlive-fonts-recommended

即可解决。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值