Changeset 58359 in vbox for trunk/src/VBox/Additions/linux
- Timestamp:
- Oct 21, 2015 1:48:39 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r58357 r58359 92 92 owner=vboxadd 93 93 group=1 94 95 test_for_gcc_and_make()96 {97 which make > /dev/null 2>&1 || printf "\nThe make utility was not found. If the following module compilation fails then\nthis could be the reason and you should try installing it.\n"98 which gcc > /dev/null 2>&1 || printf "\nThe gcc utility was not found. If the following module compilation fails then\nthis could be the reason and you should try installing it.\n"99 }100 101 test_sane_kernel_dir()102 {103 KERN_VER=`uname -r`104 KERN_DIR="/lib/modules/$KERN_VER/build"105 if [ -d "$KERN_DIR" ]; then106 KERN_REL=`make -sC $KERN_DIR --no-print-directory kernelrelease 2>/dev/null || true`107 if [ -z "$KERN_REL" -o "x$KERN_REL" = "x$KERN_VER" ]; then108 return 0109 fi110 fi111 printf "\nThe headers for the current running kernel were not found. If the following\nmodule compilation fails then this could be the reason.\n"112 if which yum >/dev/null; then113 if echo "$KERN_VER" | grep -q "uek"; then114 printf "The missing package can be probably installed with\nyum install kernel-uek-devel-$KERN_VER\n"115 else116 printf "The missing package can be probably installed with\nyum install kernel-devel-$KERN_VER\n"117 fi118 elif which zypper >/dev/null; then119 KERN_VER_SUSE=`echo "$KERN_VER" | sed 's/.*-\([^-]*\)/\1/g'`120 KERN_VER_BASE=`echo "$KERN_VER" | sed 's/\(.*\)-[^-]*/\1/g'`121 printf "The missing package can be probably installed with\nzypper install kernel-$KERN_VER_SUSE-devel-$KERN_VER_BASE\n"122 elif which apt-get >/dev/null; then123 printf "The missing package can be probably installed with\napt-get install linux-headers-$KERN_VER\n"124 fi125 }126 94 127 95 running_vboxguest() … … 290 258 begin "Building the VirtualBox Guest Additions kernel modules" 291 259 292 test_for_gcc_and_make293 test_sane_kernel_dir294 295 260 begin "Building the main Guest Additions module" 296 261 if ! $BUILDINTMP \ … … 320 285 --module-source $MODULE_SRC/vboxvideo \ 321 286 --no-print-directory install >> $LOG 2>&1; then 322 show_error "Look at $LOG to find out what went wrong. The module is not built but the others are."287 show_error "Look at $LOG to find out what went wrong. All other modules were built successfully." 323 288 else 324 289 succ_msg … … 413 378 chcon -t bin_t "$BUILDINTMP" > /dev/null 2>&1 414 379 415 setup_modules 380 setup_modules || \ 381 show_error "Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed." 416 382 mod_succ="$?" 417 383 extra_setup
Note:
See TracChangeset
for help on using the changeset viewer.