SSブログ

VirtualBox4.1.18のGuest AdditionsインストールでOpenGLが失敗する [VirtualBox]

VirtualBox4.1.18にCentOS6.3 x64をインストールしてGuest Additionsをインストールしたら、Building the OpenGL support moduleが失敗しました。
解決方法ですが、私が自力で解決できるはずもなく、Google先生に聞いてみると、すでに解決策を提供しているすばらしいサイトがありました。ここを参考に解決させていただきました。感謝!!

VrirualBox4.1.22では問題が解決されています。

まず、CentOSのメニューのアプリケーションから端末(ターミナル)を起動します。
rootになります。
$ su -

gccが必要なので、インストールします。
# yum install gcc

VirtualBoxのデバイスからGuest Additionsインストールを選択します。
デスクトップにCDがマウントされます。
コマンドでGuest Additionsをインストールします。
# sh '/media/VBOXADDITIONS_4.1.18_78361/VBoxLinuxAdditions.run'

---
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
The missing package can be probably installed with
yum install kernel-devel-2.6.32-279.el6.x86_64

Building the main Guest Additions module [失敗]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
---

あらら、 kernel-devel-2.6.32-279.el6.x86_64をインストールせよと。
# yum install kernel-devel-2.6.32-279.el6.x86_64

もう一度、インストール実行。
# sh '/media/VBOXADDITIONS_4.1.18_78361/VBoxLinuxAdditions.run'

---
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module [ OK ]
Building the shared folder support module [ OK ]
Building the OpenGL support module [失敗]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
---

あらら、OpenGLが失敗です。
ここから解決策を行っていきます。

まず、patchをコピーします。ここを開いて。
--- vboxvideo_drm.c.original 2012-07-10 08:26:22.000000000 +0200
から
.owner = THIS_MODULE,
までをコピーして、テキストファイルに貼り付けます。

ここからはTera Termを使います。これなら簡単に貼り付けできるからです。
Tera TermからSSHでログインします。ログインしたら、rootになります。
$ su -

patchファイルを作成します。
# cd /usr/src/vboxguest-4.1.18/vboxvideo
# vi vboxvideo_drm.c.patch
テキストファイルの内容をvboxvideo_drm.c.patchに貼り付け、:wq!で保存します。
(Viエディタの使い方は書きませんので、ご自分で勉強してください。)

パッチを適用します。
# patch < vboxvideo_drm.c.patch
patching file vboxvideo_drm.c

さぁ、Guest Additionsインストールです。(CDから起動しません。)
# /etc/init.d/vboxadd setup

---
emoving existing VirtualBox DKMS kernel modules [ OK ]
Removing existing VirtualBox non-DKMS kernel modules [ OK ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module [ OK ]
Building the shared folder support module [ OK ]
Building the OpenGL support module [ OK ]
Doing non-kernel setup of the Guest Additions [ OK ]
You should restart your guest to make sure the new modules are actually used
---

OK! うまくいきました。
あとはrebootしてください。

次回もお楽しみに!!

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。