web-dev-qa-db-ja.com

virtualbox-guest-dkmsのインストールが失敗する

最近、ubuntuをVirtualBoxにインストールしました。問題は、解像度が本当に小さく、表示->全画面に切り替えて拡大しても解像度が小さいままだったことです。だから私はグーグルでこのコマンドを実行してその解決策を見つけました:

Sudo apt-get install virtualbox-guest-dkms

その後、次のエラーメッセージで失敗しました。

File "/usr/share/apport/package-hooks/dkms_packages.py", line 98, in <module>
with apport.fileutils.make_report_file(report) as f: AttributeError: 'module' object has no attribute 'make_report_file'
Error! Bad return status for module build on kernel: 3.19.0-25-generic (x86_64)
Consult /var/lib/dkms/virtualbox-guest/4.3.10/build/make.log for more information

誰がそれが本当の問題であり、どのように修正できるかを知っていますか?私はそこにたくさんの提案を試みましたが、それらのどれも私のために働きませんでした。

ログファイルの内容:

DKMS make.log for virtualbox-guest-4.3.10 for kernel 3.19.0-25-generic (x86_64)
Mi 18. Nov 11:15:34 CET 2015
make: Entering directory `/usr/src/linux-headers-3.19.0-25-generic'
  LD      /var/lib/dkms/virtualbox-guest/4.3.10/build/built-in.o
  LD      /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/built-in.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/VBoxGuest-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/VBoxGuest.o
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/VBoxGuest.c: In function ‘VBoxGuestCommonGetHandledEventsLocked’:
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/VBoxGuest.c:82:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     uint32_t u32AllowedGuestCaps = pSession->u32AquiredGuestCaps | (VMMDEV_EVENT_VALID_EVENT_MASK & ~pDevExt->u32AcquireModeGuestCaps);
     ^
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/VBoxGuest.c:2660:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     uint32_t fGenFakeEvents = 0;
     ^
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/VBoxGuest.c: In function ‘VBoxGuestCommonIOCtl’:
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/VBoxGuest.c:2807:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
         VBoxGuestHGCMCallInfoTimed *pInfo = (VBoxGuestHGCMCallInfoTimed *)pvData;
         ^
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/VBoxGuest2.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/GenericRequest.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/HGCMInternal.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/Init.o
/Init.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/PhysHeap.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/SysHlp.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/VMMDev.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/alloc-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/initterm-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/memobj-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/mpnotification-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/powernotification-r0drv.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/alloc-r0drv-linux.o
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/alloc-r0drv-linux.c: In function ‘rtR0MemAllocExecVmArea’:

/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/alloc-r0drv-linux.c:194:9: warning: passing argument 3 of ‘map_vm_area’ from incompatible pointer type [enabled by default]
         if (!map_vm_area(pVmArea, PAGE_KERNEL_EXEC, &papPagesIterator))
         ^
In file included from ./Arch/x86/include/asm/io.h:200:0,
                 from ./Arch/x86/include/asm/realmode.h:5,
                 from ./Arch/x86/include/asm/acpi.h:33,
                 from ./Arch/x86/include/asm/fixmap.h:19,
                 from ./Arch/x86/include/asm/apic.h:12,
                 from ./Arch/x86/include/asm/smp.h:12,
                 from ./Arch/x86/include/asm/mmzone_64.h:10,
                 from ./Arch/x86/include/asm/mmzone.h:4,
                 from include/linux/mmzone.h:912,
                 from include/linux/gfp.h:5,
                 from include/linux/slab.h:14,
                 from /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/the-linux-kernel.h:72,
                 from /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/alloc-r0drv-linux.c:31:
include/linux/vmalloc.h:115:12: note: expected ‘struct page **’ but argument is of type ‘struct page ***’
 extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
            ^
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/assert-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/initterm-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/memobj-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/memuserkernel-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/mp-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/mpnotification-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/process-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/semevent-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/semeventmulti-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/semfastmutex-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/semmutex-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/spinlock-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/thread-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/thread2-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/time-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/linux/RTLogWriteDebugger-r0drv-linux.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/r0drv/generic/semspinmutex-r0drv-generic.o
/common/alloc/alloc.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/err/RTErrConvertFromErrno.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/err/RTErrConvertToErrno.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/log/log.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/log/logellipsis.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/log/logrel.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/log/logrelellipsis.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/log/logcom.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/log/logformat.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/RTAssertMsg1Weak.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/RTAssertMsg1Weak.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/RTAssertMsg2.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/RTAssertMsg2Add.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/RTAssertMsg2AddWeak.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/RTAssertMsg2AddWeakV.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/RTAssertMsg2Weak.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/RTAssertMsg2WeakV.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/assert.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/misc/thread.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/string/RTStrCopy.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/string/RTStrCopyP.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/string/RTStrCopyP.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/string/strformat.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/string/strformatrt.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/string/strformattype.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/string/strprintf.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/string/strtonum.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/table/avlpv.o
  CC [M]  /var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/time/time.o
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxguest/common/time/time.c: In function ‘VBoxGuest_RTTimeFromString’:
...
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxsf/dirops.c:129:29: error: ‘struct file’ has no member named ‘f_dentry’
     sf_g = GET_GLOB_INFO(dir->f_dentry->d_inode->i_sb);
                             ^
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxsf/vfsmod.h:144:60: note: in definition of macro ‘GET_GLOB_INFO’
 # define GET_GLOB_INFO(sb)       ((struct sf_glob_info *) (sb)->s_fs_info)
                                                            ^
/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxsf/dirops.c:135:16: error: ‘struct file’ has no member named ‘f_dentry’
     inode = dir->f_dentry->d_inode;
                ^
make[2]: *** [/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxsf/dirops.o] Error 1
make[1]: *** [/var/lib/dkms/virtualbox-guest/4.3.10/build/vboxsf] Error 2
make: *** [_module_/var/lib/dkms/virtualbox-guest/4.3.10/build] Error 2
make: Leaving directory `/usr/src/linux-headers-3.19.0-25-generic'
~                                                              
2
mark

最後に、問題を解決することができました。私の場合、問題は古いVirtualBoxを実行していて、それを更新した後、コマンドvirtualbox-guest-dkmsが機能し、フルスクリーンモードに切り替えられることでした。

0
mark

これを行う別の方法がありますが、私はそれを好みます。

  1. ターミナルを開く
  2. Sudo apt-get update && upgrade -y
  3. 実行が完了したら:Sudo apt-get install build-essential
  4. 上部にある実行中のVirtualBoxウィンドウで、デバイス>ゲストアドオンCDイメージの挿入を選択します。
  5. ターミナルで次に移動します:cd /media/USERNAME/そしてlsを実行して、私の場合は仮想ディスクがVBOXADDITIONS_5.0.10_104061cdに。
  6. 今フォルダーで実行Sudo sh ./VBoxLinuxAdditions.run
  7. 終了するのを待ちます
  8. 再起動してお楽しみください。

どうやって乗るのか教えてください。

0
lordqwerty