Ubuntu その12 「ゲストOSの画面を自動リサイズ」にはmakeが必要だった | 乖離のぶろぐ(*´∀`)吸い込んで応援
(゚ω゚)まずは関連情報。

http://weathercook.hatenadiary.jp/entry/20110327/1301250226
しかし、この仮想マシン上のUbuntuで画面のリサイズができずに困っていた。
■手順
実行中のVMコンソールから
「デバイス」→「Guest Additionsのインストール」でUbuntuのデスクトップに
Guest Additionsのイメージがマウントされる。
端末からインストールするには以下を実行する。
$ cd /media/cdrom0
$ sudo sh ./VBoxLinuxAdditions.run
あとは一旦Ubuntuを再起動させれば、

(゚ω゚)と書いてあるが、↑このディストリビューションはそうだったのだろう。
(゚ω゚)常に同じとは限らない
(゚ω゚) ./VBoxLinuxAdditions.run には gccとmakeコマンドが必要である。
(゚ω゚) lubuntu-13.10-desktop-amd64.iso には makeが入っておらず、
(゚ω゚) ./VBoxLinuxAdditions.runは異常終了する。




(゚ω゚) ./VBoxLinuxAdditions.run の正常終了のメッセージ。


# ls -la
合計 56564
dr-xr-xr-x 6 lubuntu lubuntu 2048 12月 19 00:51 .
drwxr-xr-x 3 root root 4096 1月 23 00:36 ..
dr-xr-xr-x 2 lubuntu lubuntu 2048 12月 19 00:51 32Bit
dr-xr-xr-x 2 lubuntu lubuntu 2048 12月 19 00:51 64Bit
-r-xr-xr-x 1 lubuntu lubuntu 647 10月 9 00:30 AUTORUN.INF
dr-xr-xr-x 2 lubuntu lubuntu 2048 12月 19 00:51 OS2
-r-xr-xr-x 1 lubuntu lubuntu 9665995 12月 19 00:47 VBoxLinuxAdditions.run
-r-xr-xr-x 1 lubuntu lubuntu 20718080 12月 19 00:53 VBoxSolarisAdditions.pkg
-r-xr-xr-x 1 lubuntu lubuntu 16798248 12月 19 00:43 VBoxWindowsAdditions-amd64.exe
-r-xr-xr-x 1 lubuntu lubuntu 10397832 12月 19 00:35 VBoxWindowsAdditions-x86.exe
-r-xr-xr-x 1 lubuntu lubuntu 311568 12月 19 00:33 VBoxWindowsAdditions.exe
-r-xr-xr-x 1 lubuntu lubuntu 6966 12月 19 00:44 autorun.sh
dr-xr-xr-x 2 lubuntu lubuntu 2048 12月 19 00:51 cert
-r-xr-xr-x 1 lubuntu lubuntu 5523 12月 19 00:44 runasroot.sh
# ./VBoxLinuxAdditions.run^C
# ^C
# ^C
# make
make: *** ターゲットが指定されておらず, makefile も見つかりません. 中止.
# VBoxLinuxAdditions.run
sh: 57: VBoxLinuxAdditions.run: not found
# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.6 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.6 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules ...done.
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.

Building the main Guest Additions module ...done.
Building the shared folder support module ...done.
Building the OpenGL support module ...done.
Doing non-kernel setup of the Guest Additions ...done.
Starting the VirtualBox Guest Additions ...done.
Installing the Window System drivers
Installing X.Org Server 1.11 modules ...done.
Setting up the Window System to use the Guest Additions ...done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services components ...done.
#
Creating udev rule for the Guest Additions kernel module.


■エラーメッセージ
(゚ω゚) エラーメッセージっぽい行を見つけたら、

ファイル名 :行数: エラーメッセージ

(゚ω゚) という形式でログが残ってるから、makeを行っている行がエラーだと分かる。
(゚ω゚) build_in_tmp: 62行目のmakeが見つからない。
(゚ω゚) つまり、makeはインストールされてないってこと。

# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.6 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.6 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The make utility was not found. If the following module compilation fails then
this could be the reason and you should try installing it.

The gcc utility was not found. If the following module compilation fails then
this could be the reason and you should try installing it.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Installing the Window System drivers
Installing X.Org Server 1.11 modules ...done.
Setting up the Window System to use the Guest Additions ...done.
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.

Installing graphics libraries and desktop services components ...done.
#
#
#
# more /var/log/vboxadd-install.log
/opt/VBoxGuestAdditions-4.3.6/src/vboxguest-4.3.6/build_in_tmp: 62: /opt/VBoxGuestAdditions-4.3.6/src/vboxguest-4.3.6/build_in_tmp: make: no
t found
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
/opt/VBoxGuestAdditions-4.3.6/src/vboxguest-4.3.6/build_in_tmp: 62: /opt/VBoxGuestAdditions-4.3.6/src/vboxguest-4.3.6/build_in_tmp: make: no
t found
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
/opt/VBoxGuestAdditions-4.3.6/src/vboxguest-4.3.6/build_in_tmp: 62: /opt/VBoxGuestAdditions-4.3.6/src/vboxguest-4.3.6/build_in_tmp: make: no
t found
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
#