ubuntu10.04如何安装virtualbox的ose版本?

Wine、Cedega、CrossOver 等配置
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

ubuntu10.04如何安装virtualbox的ose版本?

#1

帖子 罗非鱼 » 2010-05-07 0:06

ubuntu10.04如何编译安装virtualbox的ose版本?
头像
wowoto
帖子: 3050
注册时间: 2009-04-11 12:17
系统: windows7

Re: ubuntu10.04如何安装virtualbox的ose版本?

#2

帖子 wowoto » 2010-05-07 0:19

下载了再看文档咯...
wowoto>ubuntu8.04>ubuntu9.04>Archlinux>FreeBSD8.0>Archlinux & end here.
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#3

帖子 罗非鱼 » 2010-05-07 8:49

http://www.virtualbox.org/wiki/Linux%20 ... structions

Building VirtualBox ¶

1. Change to the root directory of the sources and execute the configure script:

./configure --disable-hardening

If it finds everything it needs, it will create a file called 'AutoConfig.kmk' containing paths to the various tools on your system. Also, it will create an environment setup script called env.sh. This step only has to be done once (if something changes in your build tool setup, you might have to repeat it but keep in mind that both output files will be overwritten).

The switch --disable-hardening should not be used for building packages for redistribution or for production use.

2. Whenever you want to build VirtualBox, you have to open a shell and source the generated environment setup script 'env.sh', i.e. do

source ./env.sh

3. To build a release package, type

kmk all

This produces the required binaries in out/linux.x86/release/bin/. If you want to build a debug version, type

kmk BUILD_TYPE=debug

In case you have more than one CPU core, kmk will automatically do a parallel build.

4. If you made a hardened build (that is, you omitted the --disable-hardened switch from configure) you have to set some symbolic links manually to be able to start VMs from the bin/ directory:

cd out/linux.x86/release/bin/components
ln -s ../VBoxDDU.so .
ln -s ../VBoxREM.so .
ln -s ../VBoxRT.so .
ln -s ../VBoxVMM.so .
ln -s ../VBoxXPCOM.so .

Building OSE packages for distribution ¶

Never disable hardening (see previous section) when creating packages for redistribution.

To be more LSB-compliant, change the default pathes which are used by the VirtualBox binaries to find their components. Add the following build variables to LocalConfig.kmk:

VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox
This is the application's private directory, architecture-dependent.
VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
Where to put the shared libraries, usually the same directory as the private path as the VirtualBox shared libraries are normally not used by any other application.
VBOX_WITH_ORIGIN :=
Disable RPATH=$ORIGIN and use a fixed RUNPATH.
VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
Set RUNPATH to the directory where our shared libraries can be found.
VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
This is the applications's private directory, not architecture-dependent.
VBOX_PATH_APP_DOCS := /usr/share/doc/virtualbox
Set the directory containing the documentation. The file VirtualBox.chm and UserManual.pdf (both are not part of the OSE distribution) are searched within this directory.
VBOX_WITH_TESTCASES :=
Save compile time by not building the testcases.
VBOX_WITH_TESTSUITE :=
Save compile time by not building the testsuite.

Running your build ¶

You can run VirtualBox directly from the build target directory (out/linux.x86/release/bin/). But first of all, you must build and install the VirtualBox kernel module, whose sources will have been copied to the build target directory.

So, issue the following:

cd out/linux.x86/release/bin/src
make
sudo make install
cd ..

Then it should have been installed to your modules directory and you can load it using modprobe vboxdrv. Make sure you give yourself read and write access to /dev/vboxdrv.

If you made a hardened build, make sure that the setuid stubs have the correct permissions:

for f in VirtualBox VBoxHeadless VBoxSDL VBoxBFE VBoxNetDHCP VBoxNetAdpCtl; do
chown root.root $f
chmod 4511 $f
done

Finally, you can start one of the frontends, e.g.

LD_LIBRARY_PATH=. ./VirtualBox

Note that the LD_LIBRARY_PATH=. is required for VBox version < 2.0 because we have to find our .so files and the output directory is not in the system's library path. Starting with VBox 2.0, the binaries have RPATH set.
我按照这个指导做,全部安装好了,我的步骤是:
cd /home/pt/VirtualBox-3.1.6_OSE
./configure --disable-hardening
source ./env.sh
kmk all
cd out/linux.x86/release/bin/src
make
sudo make install
cd ..
modprobe vboxdrv
sudo modprobe vboxdrv
sudo groupadd vboxusers
chkconfig --add vbox
sudo apt-get install chkconfig
chkconfig --add vbox
已经可以打开virtualbox了,请看附件,但是又出现问题,
pt@pt-laptop:~$ /etc/init.d/vboxdrv setup
bash: /etc/init.d/vboxdrv: No such file or directory
请问,如何解决?
附件
Screenshot-4.png
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#4

帖子 罗非鱼 » 2010-05-07 9:34

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

'/etc/init.d/vboxdrv setup'

对于这个错误,我编辑了一个/etc/init.d/vboxdrv(将我的ubuntu9.10下面的这个文件拷贝过来,并设置好文件可执行),
pt@pt-laptop:~$ sudo /etc/init.d/vboxdrv setup
[sudo] password for pt:
pt@pt-laptop:~$

这样操作后,启动virtualbox还是出现这个问题,现在我又看了英文,
or there is a permission problem with /dev/vboxdrv
我的/dev/下面根本没有vboxdrv这个文件夹,请问,是否有ubuntu10.04使用virtualbox3.1.6的?你们出现这样的问题没有?
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#5

帖子 罗非鱼 » 2010-05-07 9:50

是否我下载了错误的版本,请看我的屏幕拷贝,没有usb设备!
附件
Screenshot-5.png
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#6

帖子 罗非鱼 » 2010-05-07 10:22

我现在把我的ubuntu9.10安装的virtualbox贴给大家看,
1、忘记记录当时如何安装的了,安装完成后,系统自动在system菜单下面,出现virtualbox的logo,见photo1
我这次安装,自己手动将virtualbox的启动命令填入菜单的。见photo11
2、版本自动升级到了3.1.6r59338,见photo2,这次在ubuntu10.04安装的vb,logo不一样,见photo22
3、ubuntu9.1下面的那个vb有usb device,见photo3.我这次安装的就没有usb device,见photo33
我感觉安装有问题,还是就是这样!
附件
photo33.png
photo22.png
photo11.png
photo3.png
photo2.png
photo1.png
头像
cuckoo1978
帖子: 513
注册时间: 2009-05-09 14:42
来自: 济南
联系:

Re: ubuntu10.04如何安装virtualbox的ose版本?

#7

帖子 cuckoo1978 » 2010-05-07 10:32

核心问题? 还第一次碰到,挺怪异,,,我直接从新立得 里面下载的,,安装后挺好,,然后下了一个萝卜 非 ghost 版本的winxp ,安装后挺好用的。。。
废土狂猪 :看啥 ,没见过网管吗,再看 吃了你!
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#8

帖子 罗非鱼 » 2010-05-07 10:53

仔细查看了我的ubuntu9.10下面的vb目录,发现一个sdk文件夹,估计我这次安装错了,应该装sdk版本,需要注册的VirtualBox binaries,二进制版本,
VirtualBox 3.1.6 Software Developer Kit (SDK) All platforms (registration required)
http://dlc.sun.com/virtualbox/vboxsdkdownload.html
应该下载这个进行安装。
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#9

帖子 罗非鱼 » 2010-05-07 11:25

cuckoo1978,请看看你的那个版本可否使用usb设备?ubuntu默认安装,好像是不能使用usb设备的,以前如此,不知道现在如何了?
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#10

帖子 罗非鱼 » 2010-05-07 11:48

我解压下载的VirtualBoxSDK-3.1.6-59338,执行了下面的操作:
pt@pt-laptop:~$ python /home/pt/sdk/installer/vboxapisetup.py install
Traceback (most recent call last):
File "/home/pt/sdk/installer/vboxapisetup.py", line 61, in <module>
main(sys.argv)
File "/home/pt/sdk/installer/vboxapisetup.py", line 43, in main
raise Exception("No VBOX_INSTALL_PATH defined, exiting")
Exception: No VBOX_INSTALL_PATH defined, exiting
pt@pt-laptop:~$ python /home/pt/sdk/installer/vboxapisetup.py install /home/pt/vbox
Traceback (most recent call last):
File "/home/pt/sdk/installer/vboxapisetup.py", line 61, in <module>
main(sys.argv)
File "/home/pt/sdk/installer/vboxapisetup.py", line 43, in main
raise Exception("No VBOX_INSTALL_PATH defined, exiting")
Exception: No VBOX_INSTALL_PATH defined, exiting
pt@pt-laptop:~$
请问,如何处理?
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#11

帖子 罗非鱼 » 2010-05-07 12:18

刚才,我使用了ubuntu10.04的默认安装virtualbox,发现和以前一样不可以使用usb设备。
请安装sdk版本的指点一下。
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#12

帖子 罗非鱼 » 2010-05-07 12:32

我在9.1上面使用的virtualbox好好的,
1、可以流畅运行xp
2、可以使用usb设备
刚才使用默认的vortualbox版本,安装xp时,发现不认硬盘了?
附件
ose3.png
ose2.png
ose1.png
头像
紅中愛發財
帖子: 185
注册时间: 2009-07-15 15:31

Re: ubuntu10.04如何安装virtualbox的ose版本?

#13

帖子 紅中愛發財 » 2010-05-07 15:45

新得立里面有啊

代码: 全选

https://launchpad.net/~……/+archive/ppa
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#14

帖子 罗非鱼 » 2010-05-07 17:41

请您注意一点,新立得里面的virtualbox不能使用usb设备,我也知道有。
罗非鱼
帖子: 980
注册时间: 2008-04-12 12:44

Re: ubuntu10.04如何安装virtualbox的ose版本?

#15

帖子 罗非鱼 » 2010-05-07 17:56

各位看官,都试试再发言。
1、我知道ubuntu有系统默认的
2、我也安装了ubuntu系统默认的。
3、ubuntu系统默认的virtualbox由於没有usb支持,不能使用网银。
4、virtualboxsdk版本支持usb,可以使用网银。
请仔细看我在6楼的贴图。
回复