VirtualBox エラー - カーネル ドライバーがインストールされていません (rc=-1908)
今日、Ubuntu 14.04 LTS システムを Linux カーネル 4.4.4 にアップグレードしました。これまでのところ、アップグレード プロセスはエラーなく完了しました。ただし、Oracle VirtualBox は、カーネル 4.4.4 にアップグレードした後、動作しませんでした。
新しい仮想マシンを起動すると必ず次のエラーが表示され、ゲスト マシンを起動できませんでした。
Kernel driver not installed (rc=-1908)
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
'/sbin/rcvboxdrv setup'
as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
Where: sublibOsInit what:3
VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support
driver is not installed, On linux, open returned ENOENT.
VirtualBox エラー - カーネル ドライバーがインストールされていません (rc=-1908)
上のスクリーンショットでわかるように、エラー ウィザードには、次のコマンドを実行すると問題を解決できることが示されています。
sudo /sbin/rcvboxdrv setup
しかし、それも役に立ちませんでした。上記のコマンドを実行した後、次のエラーが発生しました。
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modulesError! Could not locate dkms.conf file.
File: does not exist.
...done.
Trying to register the VirtualBox kernel modules using DKMSError! DKMS tree already contains: vboxhost-5.0.16
You cannot add the same module/version combo more than once.
...failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
(Look at /var/log/vbox-install.log to find out what went wrong)
古いカーネルに戻したくありません。 Googleで少し検索した後、askubuntuフォーラムから解決策を見つけました。
正確な手順に従ったところ、期待どおりにうまくいきました。
上記のエラーを解決するために私がやったことは次のとおりです。
次のリポジトリを追加します。
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
ソース リストを更新し、gcc/g++ をインストールします。
sudo apt-get update
sudo apt-get install gcc-5 g++-5
GCCをインストールしました。次に、次のコマンドを実行して、インストールされているバージョンを表示します。
ls -lh /usr/bin/gcc*
サンプル出力:
lrwxrwxrwx 1 root root 7 Apr 8 2014 /usr/bin/gcc -> gcc-4.8
-rwxr-xr-x 1 root root 758K Jan 27 13:10 /usr/bin/gcc-4.8
-rwxr-xr-x 1 root root 858K Dec 6 04:31 /usr/bin/gcc-5
lrwxrwxrwx 1 root root 10 Apr 8 2014 /usr/bin/gcc-ar -> gcc-ar-4.8
-rwxr-xr-x 1 root root 27K Jan 27 13:10 /usr/bin/gcc-ar-4.8
-rwxr-xr-x 1 root root 27K Dec 6 04:31 /usr/bin/gcc-ar-5
lrwxrwxrwx 1 root root 10 Apr 8 2014 /usr/bin/gcc-nm -> gcc-nm-4.8
-rwxr-xr-x 1 root root 27K Jan 27 13:10 /usr/bin/gcc-nm-4.8
-rwxr-xr-x 1 root root 27K Dec 6 04:31 /usr/bin/gcc-nm-5
lrwxrwxrwx 1 root root 14 Apr 8 2014 /usr/bin/gcc-ranlib -> gcc-ranlib-4.8
-rwxr-xr-x 1 root root 27K Jan 27 13:10 /usr/bin/gcc-ranlib-4.8
-rwxr-xr-x 1 root root 27K Dec 6 04:31 /usr/bin/gcc-ranlib-5
上記の出力でわかるように、私のマシンには gcc-4.8 と gcc-5 のバージョンがあります。
次に、次のコマンドを使用して代替案を更新します。
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20 --slave /usr/bin/g++ g++ /usr/bin/g++-5
独自の代替案を追加する必要があります。
最後に、以下に示すように、使用する代替 gcc を選択します。
sudo update-alternatives --config gcc
サンプル出力:
Type the selection. Here I choose gcc-5, so I entered number 2.
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/gcc-4.8 40 auto mode
1 /usr/bin/gcc-4.8 40 manual mode
2 /usr/bin/gcc-5 20 manual mode
Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/gcc-5 to provide /usr/bin/gcc (gcc) in manual mode
それでおしまい。
ここで、次のコマンドを使用して VirtualBox カーネル モジュールを再コンパイルしてみます。
sudo /usr/lib/virtualbox/vboxdrv.sh setup
サンプル出力:
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modulesError! Could not locate dkms.conf file.
File: does not exist.
...done.
Trying to register the VirtualBox kernel modules using DKMSError! DKMS tree already contains: vboxhost-5.0.16
You cannot add the same module/version combo more than once.
...failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...done.
Starting VirtualBox kernel modules ...done.
出来上がり!今回はうまくいきました。
これで、ゲスト マシンを問題なく起動できるようになりました。
Arch Linux とその派生製品については、次のリンクを参照してください。
- Arch Linux での「結果コード: NS_ERROR_FAILURE (0x80004005)」VirtualBox エラーを解決する
Oracle VirtualBox 拡張パックの更新中に問題がありましたか?これが解決策です。
- Ubuntu で「拡張パックのインストールに失敗しました」エラーを修正する方法