LoginSignup
0
0

More than 3 years have passed since last update.

CentOS へ VirtualBox をインストールする手順

Posted at

CentOS 7 へ VirtualBox5.0.24 をインストールしたときの手順

対象Linuxのアーキテクチャ確認

# arch
x86_64

以下サイトでダウンロード arch の結果が x86_64 なのでAMD64を選択
https://www.virtualbox.org/wiki/Download_Old_Builds_5_0

インストール

# yum -y install VirtualBox-5.0-5.0.24_108355_el7-1.x86_64.rpm
読み込んだプラグイン:fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
VirtualBox-5.0-5.0.24_108355_el7-1.x86_64.rpm を調べています: VirtualBox-5.0-5.0.24_108355_el7-1.x86_64
VirtualBox-5.0-5.0.24_108355_el7-1.x86_64.rpm をインストール済みとして設定しています
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ VirtualBox-5.0.x86_64 0:5.0.24_108355_el7-1 を インストール
--> 依存性の処理をしています: libQtCore.so.4()(64bit) のパッケージ: VirtualBox-5.0-5.0.24_108355_el7-1.x86_64
base                                                                                                                                                                  | 3.6 kB  00:00:00
epel/x86_64/metalink                                                                                                                                                  | 3.7 kB  00:00:00
epel                                                                                                                                                                  | 4.7 kB  00:00:00
extras                                                                                                                                                                | 2.9 kB  00:00:00
mariadb                                                                                                                                                               | 2.9 kB  00:00:00
percona-release-noarch                                                                                                                                                | 2.9 kB  00:00:00
percona-release-x86_64                                                                                                                                                | 2.9 kB  00:00:00
pgdg10                                                                                                                                                                | 3.6 kB  00:00:00
pgdg11                                                                                                                                                                | 3.6 kB  00:00:00
pgdg12                                                                                                                                                                | 3.6 kB  00:00:00
pgdg94                                                                                                                                                                | 3.6 kB  00:00:00
pgdg95                                                                                                                                                                | 3.6 kB  00:00:00
pgdg96                                                                                                                                                                | 3.6 kB  00:00:00
updates                                                                                                                                                               | 2.9 kB  00:00:00
(1/14): extras/7/x86_64/primary_db                                                                                                                                    | 165 kB  00:00:00
(2/14): epel/x86_64/group_gz                                                                                                                                          |  95 kB  00:00:00
(3/14): epel/x86_64/updateinfo                                                                                                                                        | 1.0 MB  00:00:00
(4/14): percona-release-noarch/7/primary_db                                                                                                                           |  22 kB  00:00:00
(5/14): mariadb/primary_db                                                                                                                                            |  53 kB  00:00:00
(6/14): pgdg10/7/x86_64/primary_db                                                                                                                                    | 204 kB  00:00:01
(7/14): pgdg11/7/x86_64/primary_db                                                                                                                                    | 198 kB  00:00:01
(8/14): pgdg94/7/x86_64/primary_db                                                                                                                                    | 399 kB  00:00:00
(9/14): pgdg95/7/x86_64/primary_db                                                                                                                                    | 187 kB  00:00:00
(10/14): pgdg12/7/x86_64/primary_db                                                                                                                                   | 110 kB  00:00:02
(11/14): pgdg96/7/x86_64/primary_db                                                                                                                                   | 198 kB  00:00:00
(12/14): updates/7/x86_64/primary_db                                                                                                                                  | 7.6 MB  00:00:00
(13/14): percona-release-x86_64/7/x86_64/primary_db                                                                                                                   | 1.0 MB  00:00:03
(14/14): epel/x86_64/primary_db                                                                                                                                       | 6.8 MB  00:01:32
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * epel: nrt.edge.kernel.org
 * extras: ftp.riken.jp
 * updates: ftp.riken.jp
--> 依存性の処理をしています: libQtGui.so.4()(64bit) のパッケージ: VirtualBox-5.0-5.0.24_108355_el7-1.x86_64
--> 依存性の処理をしています: libQtOpenGL.so.4()(64bit) のパッケージ: VirtualBox-5.0-5.0.24_108355_el7-1.x86_64
--> 依存性の処理をしています: libSDL-1.2.so.0()(64bit) のパッケージ: VirtualBox-5.0-5.0.24_108355_el7-1.x86_64
--> 依存性の処理をしています: libvpx.so.1()(64bit) のパッケージ: VirtualBox-5.0-5.0.24_108355_el7-1.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ SDL.x86_64 0:1.2.15-15.el7_7 を インストール
---> パッケージ libvpx.x86_64 0:1.3.0-5.el7_0 を インストール
---> パッケージ qt.x86_64 1:4.8.7-3.el7_6 を インストール
--> 依存性の処理をしています: qt-settings のパッケージ: 1:qt-4.8.7-3.el7_6.x86_64
--> 依存性の処理をしています: libdbus-1.so.3(LIBDBUS_1_3)(64bit) のパッケージ: 1:qt-4.8.7-3.el7_6.x86_64
---> パッケージ qt-x11.x86_64 1:4.8.7-3.el7_6 を インストール
--> 依存性の処理をしています: libmng.so.1()(64bit) のパッケージ: 1:qt-x11-4.8.7-3.el7_6.x86_64
--> トランザクションの確認を実行しています。
---> パッケージ dbus-libs.x86_64 1:1.6.12-17.el7 を 更新
--> 依存性の処理をしています: dbus-libs(x86-64) = 1:1.6.12-17.el7 のパッケージ: 1:dbus-1.6.12-17.el7.x86_64
---> パッケージ dbus-libs.x86_64 1:1.10.24-13.el7_6 を アップデート
---> パッケージ libmng.x86_64 0:1.0.10-14.el7 を インストール
---> パッケージ qt-settings.noarch 0:19-23.10.el7.centos を インストール
--> トランザクションの確認を実行しています。
---> パッケージ dbus.x86_64 1:1.6.12-17.el7 を 更新
--> 依存性の処理をしています: dbus = 1:1.6.12-17.el7 のパッケージ: 1:dbus-x11-1.6.12-17.el7.x86_64
---> パッケージ dbus.x86_64 1:1.10.24-13.el7_6 を アップデート
--> トランザクションの確認を実行しています。
---> パッケージ dbus-x11.x86_64 1:1.6.12-17.el7 を 更新
---> パッケージ dbus-x11.x86_64 1:1.10.24-13.el7_6 を アップデート
--> 依存性解決を終了しました。

依存性を解決しました

=============================================================================================================================================================================================
 Package                                アーキテクチャー               バージョン                                   リポジトリー                                                        容量
=============================================================================================================================================================================================
インストール中:
 VirtualBox-5.0                         x86_64                         5.0.24_108355_el7-1                          /VirtualBox-5.0-5.0.24_108355_el7-1.x86_64                         150 M
依存性関連でのインストールをします:
 SDL                                    x86_64                         1.2.15-15.el7_7                              updates                                                            205 k
 libmng                                 x86_64                         1.0.10-14.el7                                base                                                               171 k
 libvpx                                 x86_64                         1.3.0-5.el7_0                                base                                                               498 k
 qt                                     x86_64                         1:4.8.7-3.el7_6                              base                                                               4.6 M
 qt-settings                            noarch                         19-23.10.el7.centos                          updates                                                             18 k
 qt-x11                                 x86_64                         1:4.8.7-3.el7_6                              base                                                                13 M
依存性関連での更新をします:
 dbus                                   x86_64                         1:1.10.24-13.el7_6                           base                                                               245 k
 dbus-libs                              x86_64                         1:1.10.24-13.el7_6                           base                                                               169 k
 dbus-x11                               x86_64                         1:1.10.24-13.el7_6                           base                                                                48 k

トランザクションの要約
=============================================================================================================================================================================================
インストール  1 パッケージ (+6 個の依存関係のパッケージ)
更新                       ( 3 個の依存関係のパッケージ)

合計容量: 168 M
総ダウンロード容量: 18 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/9): dbus-libs-1.10.24-13.el7_6.x86_64.rpm                                                                                                                          | 169 kB  00:00:00
(2/9): dbus-x11-1.10.24-13.el7_6.x86_64.rpm                                                                                                                           |  48 kB  00:00:00
(3/9): SDL-1.2.15-15.el7_7.x86_64.rpm                                                                                                                                 | 205 kB  00:00:00
(4/9): dbus-1.10.24-13.el7_6.x86_64.rpm                                                                                                                               | 245 kB  00:00:00
(5/9): libmng-1.0.10-14.el7.x86_64.rpm                                                                                                                                | 171 kB  00:00:00
(6/9): libvpx-1.3.0-5.el7_0.x86_64.rpm                                                                                                                                | 498 kB  00:00:00
(7/9): qt-settings-19-23.10.el7.centos.noarch.rpm                                                                                                                     |  18 kB  00:00:00
(8/9): qt-4.8.7-3.el7_6.x86_64.rpm                                                                                                                                    | 4.6 MB  00:00:00
(9/9): qt-x11-4.8.7-3.el7_6.x86_64.rpm                                                                                                                                |  13 MB  00:00:02
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
合計                                                                                                                                                         6.2 MB/s |  18 MB  00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  更新します              : 1:dbus-libs-1.10.24-13.el7_6.x86_64                                                                                                                         1/13
  更新します              : 1:dbus-1.10.24-13.el7_6.x86_64                                                                                                                              2/13
  インストール中          : SDL-1.2.15-15.el7_7.x86_64                                                                                                                                  3/13
  インストール中          : qt-settings-19-23.10.el7.centos.noarch                                                                                                                      4/13
  インストール中          : 1:qt-4.8.7-3.el7_6.x86_64                                                                                                                                   5/13
  インストール中          : libvpx-1.3.0-5.el7_0.x86_64                                                                                                                                 6/13
  インストール中          : libmng-1.0.10-14.el7.x86_64                                                                                                                                 7/13
  インストール中          : 1:qt-x11-4.8.7-3.el7_6.x86_64                                                                                                                               8/13
  インストール中          : VirtualBox-5.0-5.0.24_108355_el7-1.x86_64                                                                                                                   9/13

Creating group 'vboxusers'. VM users must be member of that group!

No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Stopping VirtualBox kernel modules [  OK  ]
Recompiling VirtualBox kernel modules [失敗]
  (Look at /var/log/vbox-install.log to find out what went wrong)
  更新します              : 1:dbus-x11-1.10.24-13.el7_6.x86_64                                                                                                                         10/13
  整理中                  : 1:dbus-x11-1.6.12-17.el7.x86_64                                                                                                                            11/13
  整理中                  : 1:dbus-1.6.12-17.el7.x86_64                                                                                                                                12/13
  整理中                  : 1:dbus-libs-1.6.12-17.el7.x86_64                                                                                                                           13/13
  検証中                  : 1:qt-4.8.7-3.el7_6.x86_64                                                                                                                                   1/13
  検証中                  : libmng-1.0.10-14.el7.x86_64                                                                                                                                 2/13
  検証中                  : 1:dbus-libs-1.10.24-13.el7_6.x86_64                                                                                                                         3/13
  検証中                  : 1:qt-x11-4.8.7-3.el7_6.x86_64                                                                                                                               4/13
  検証中                  : 1:dbus-x11-1.10.24-13.el7_6.x86_64                                                                                                                          5/13
  検証中                  : 1:dbus-1.10.24-13.el7_6.x86_64                                                                                                                              6/13
  検証中                  : libvpx-1.3.0-5.el7_0.x86_64                                                                                                                                 7/13
  検証中                  : qt-settings-19-23.10.el7.centos.noarch                                                                                                                      8/13
  検証中                  : SDL-1.2.15-15.el7_7.x86_64                                                                                                                                  9/13
  検証中                  : VirtualBox-5.0-5.0.24_108355_el7-1.x86_64                                                                                                                  10/13
  検証中                  : 1:dbus-x11-1.6.12-17.el7.x86_64                                                                                                                            11/13
  検証中                  : 1:dbus-1.6.12-17.el7.x86_64                                                                                                                                12/13
  検証中                  : 1:dbus-libs-1.6.12-17.el7.x86_64                                                                                                                           13/13

インストール:
  VirtualBox-5.0.x86_64 0:5.0.24_108355_el7-1

依存性関連をインストールしました:
  SDL.x86_64 0:1.2.15-15.el7_7 libmng.x86_64 0:1.0.10-14.el7 libvpx.x86_64 0:1.3.0-5.el7_0 qt.x86_64 1:4.8.7-3.el7_6 qt-settings.noarch 0:19-23.10.el7.centos qt-x11.x86_64 1:4.8.7-3.el7_6

依存性を更新しました:
  dbus.x86_64 1:1.10.24-13.el7_6                             dbus-libs.x86_64 1:1.10.24-13.el7_6                             dbus-x11.x86_64 1:1.10.24-13.el7_6

完了しました!

Xming などで XWindowを表示できるようにしておく。
DISPLAY環境変数を設定・確認

# env | grep DISPLAY
DISPLAY=localhost:0.0

VirtualBox起動

# virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.10.0-514.el7.x86_64) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /sbin/rcvboxdrv setup

         You will not be able to start VMs until this problem is fixed.

下記画面が表示され、起動してくればインストールは問題無し。
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0