Virtualbox是一款半虚拟化软件,用于mac/win/linux以及其它unix系统虚拟化,目前最新版本是5.1。
在安装VirtualBox5.1的时候,发现和5.0版本安装不兼容,需要先卸载5.0版本。
在rhel6.2系统上安装完成之后,启动VirtualBox会出现如下错误:
[cnangel@localhost ~]$VirtualBox
xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Qt WARNING: Qt: Failed to create XKB context!
Qt WARNING: Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .
process 32666: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
D-Bus not built with -rdynamic so unable to print a backtrace
Aborted
应该是打包关系,相关xkb的库文件没有依赖打入,故需要手工安装:
[cnangel@localhost ~]$ sudo yum install xorg-x11-server-common xkeyboard-config -y
然后继续运行VirtualBox命令,发现仍然出现错误:
[cnangel@localhost ~]$VirtualBox
process 9701: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
D-Bus not built with -rdynamic so unable to print a backtrace
Aborted
应该是spec文件打包之后,运行之前需要提前做一些准备工作,%postrun段需要生成machine-id,现在则手工生成:
[cnangel@localhost ~]$ dbus-uuidgen > machine-id
** (process:2390): WARNING **: Error connecting to bus: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory