LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 807|回复: 6

编译virtualbox出错了

[复制链接]
发表于 2012-3-16 14:33:27 | 显示全部楼层 |阅读模式
 * Package:    app-emulation/virtualbox-4.1.8
 * Repository: gentoo
 * Maintainer: polynomial-c@gentoo.org patrick@gentoo.org
 * USE:        additions alsa amd64 elibc_glibc kernel_linux multilib opengl pam sdk userland_GNU
 * FEATURES:   ccache sandbox
* No USE="qt4" selected, this build will not include
* any Qt frontend.
>>> Unpacking source...
>>> Unpacking VirtualBox-4.1.8.tar.bz2 to /var/tmp/portage/app-emulation/virtualbox-4.1.8/work
>>> Source unpacked in /var/tmp/portage/app-emulation/virtualbox-4.1.8/work
>>> Preparing source in /var/tmp/portage/app-emulation/virtualbox-4.1.8/work/VirtualBox-4.1.8_OSE ...
* Applying virtualbox-ose-3.2.8-mesa-check.patch ...
 [ ok ]
* Applying virtualbox-4-makeself-check.patch ...
 [ ok ]
* Applying virtualbox-4-mkisofs-check.patch ...
 [ ok ]
* Applying virtualbox-4.1.4-asneeded.patch ...
 [ ok ]
* Applying virtualbox-4.0.2-restore_old_machines_dir.patch ...
 [ ok ]
* Applying virtualbox-4.1.2-vboxpci-build.patch ...
 [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-emulation/virtualbox-4.1.8/work/VirtualBox-4.1.8_OSE ...
Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK.
Checking for kBuild: found, OK.
Checking for gcc: found version 4.5.3, OK.
Checking for as86: found version 0.16.17, OK.
Checking for bcc: found version 0.16.18, OK.
Checking for iasl: found version 20090123, OK.
Checking for xslt: found, OK.
Checking for pthread: found, OK.
Checking for libxml2: found version 2.7.8, OK.
Checking for libxslt: found version 1.1.26, OK.
Checking for libIDL: found version 0.8.14, OK.
Checking for ssl: found version OpenSSL 1.0.0h 12 Mar 2012, OK.
Checking for libcurl: found version 7.24.0, OK.
Checking for zlib: found version 1.2.5, OK.
Checking for libpng: found version 1.5.9, OK.
Checking for SDL: found version 1.2.15, OK.
Checking for X libraries: Checking for Xcursor: found, OK.
Checking for Xinerama: found, OK.
Checking for Xrandr: found, OK.
Checking for Xmu: found, OK.
Checking for Mesa / GLU: Checking for static stc++ library: found, OK.
Checking for ALSA: found version 1.0.25, OK.
Checking for libcap library: found, OK.
Checking for compiler.h: compiler.h not found, OK.
Checking for 32-bit support:
  Cannot execute 32-bit applications! Either enable 32-bit support in the
  kernel configuration or use --disable-vmmraw to disable 32-bit guests.
Check /var/tmp/portage/app-emulation/virtualbox-4.1.8/work/VirtualBox-4.1.8_OSE/configure.log for details
* ERROR: app-emulation/virtualbox-4.1.8 failed (configure phase):
*   configure failed
*
* Call stack:
*     ebuild.sh, line  85:  Called src_configure
*   environment, line 7446:  Called die
* The specific snippet of code:
*       ./configure --with-gcc="$(tc-getCC)" --with-g++="$(tc-getCXX)" --disable-kmods --disable-dbus ${myconf} || die "configure failed"
*
* If you need support, post the output of 'emerge --info =app-emulation/virtualbox-4.1.8',
* the complete build log and the output of 'emerge -pqv =app-emulation/virtualbox-4.1.8'.
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME="/etc/java-config-2/current-system-vm"
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info
* The complete build log is located at '/var/tmp/portage/app-emulation/virtualbox-4.1.8/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-4.1.8/temp/environment'.
* S: '/var/tmp/portage/app-emulation/virtualbox-4.1.8/work/VirtualBox-4.1.8_OSE'


好象提示说Cannot execute 32-bit applications! Either enable 32-bit support in the
  kernel configuration or use --disable-vmmraw to disable 32-bit guests.  不支持32位的软件要配置内核,请问要如何配置啊
发表于 2012-3-16 17:36:55 | 显示全部楼层
您既然使用的是multilib的profile,内核中怎会没有开启IA32 Emulation... 还是请您看看您的内核配置中"Executable file formats / Emulations" -> "IA32 Emulation"有没有开启。另外请您贴出emerge --info virtualbox的输出和 /var/tmp/portage/app-emulation/virtualbox-4.1.8/work/VirtualBox-4.1.8_OSE/configure.log 的内容。

另外,请注意如果您没有开virtualbox的qt4 USE flag,它就没有图形界面。
回复 支持 反对

使用道具 举报

发表于 2012-3-17 09:48:46 | 显示全部楼层
楼主这个问题很好解决啊,只要选上
  1. Executable file formats / Emulations  --->
  2.    [*] IA32 Emulation
复制代码

重新编译内核,再次安装virtualbox就OK了。


我这边问题有点杯具了。
我初装系统的时候选择了non-multilib的profile,纯64位,系统里根本没有32位的头文件和库,vbox没法安装了。

  1. [b]build.log:[/b]
  2. Checking for 32-bit support:
  3.   Cannot compile 32-bit applications (missing headers and/or libraries)!
复制代码

  1. [b]configure.log:[/b]
  2. ***** Checking 32-bit support *****
  3. compiling the following source file:
  4. ....
  5. ....
  6. /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
  7. compilation terminated.
复制代码


我的CPU也不支持VT虚拟化,没办法使用KVM,直接就杯具了


Debian里面好像是可以直接安装mulitlib的
apt-get install g++-multilib
apt-get install gcc-multilib

Gentoo中有没有类似的解决办法啊?
难道只能重装系统??? 搞一趟太累了。
回复 支持 反对

使用道具 举报

发表于 2012-3-17 09:58:43 | 显示全部楼层
楼上,用linux32 chroot 个stage3 是否可以?
回复 支持 反对

使用道具 举报

发表于 2012-3-17 13:49:00 | 显示全部楼层
Post by hongly;2161971

Gentoo中有没有类似的解决办法啊?
难道只能重装系统??? 搞一趟太累了。

可以从no-multilib转到multilib,只是需要重新emerge几个包,主要是toolchain包。这里有两份教程:
http://jkroon.blogs.uls.co.za/it ... ultilib-to-multilib
http://www.gentoo-wiki.info/HOWTO_AMD_64#Howto_switch_to_multilib
注意gentoo-wiki.info上的教程老了些,对现在的Gentoo系统可能某些细节要变通一下。
回复 支持 反对

使用道具 举报

发表于 2012-3-18 13:18:34 | 显示全部楼层
@RichardGv.

his cpu not support vt feature. Is that a disaster?
回复 支持 反对

使用道具 举报

发表于 2012-3-18 15:49:52 | 显示全部楼层
Post by jinleileiking;2162042
@RichardGv.

his cpu not support vt feature. Is that a disaster?


CPU是T3000,不支持VT,所以无法使用KVM,但是Vbox是可以的,以前在Debian下装过vbox,没有问题,只是虚拟的客户机只能使用单核。

To: RichardGv
感谢回复,为了稳妥起见和避免以后不可预知的麻烦,还是决定重装系统、选择multilib了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表