VirtualBox 5.1 Released – Install on RHEL/CentOS/Fedora and Debian/Ubuntu/Linux Mint

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

129 Responses

  1. Ruth says:

    Hi,

    I am also stuck on installing this. I have a centos7 and tried to install virtualbox. I started by downloading the virtualbox.repo and added it into my repositories.

    But as soon as I type `yum update` I get a massive error:

    [[email protected] yum.repos.d]# yum install VirtualBox-5.1
    Loaded plugins: fastestmirror, ovl
    virtualbox/7/x86_64/signature | 181 B 00:00:00
    Retrieving key from https://www.virtualbox.org/download/oracle_vbox.asc
    virtualbox/7/x86_64/signature | 1.1 kB 00:00:00 !!!
    Traceback (most recent call last):
    File “/usr/bin/yum”, line 29, in
    yummain.user_main(sys.argv[1:], exit_code=True)
    File “/usr/share/yum-cli/yummain.py”, line 370, in user_main
    errcode = main(args)
    File “/usr/share/yum-cli/yummain.py”, line 179, in main
    result, resultmsgs = base.doCommands()
    File “/usr/share/yum-cli/cli.py”, line 583, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
    File “/usr/share/yum-cli/yumcommands.py”, line 445, in doCommand
    return base.installPkgs(extcmds, basecmd=basecmd)
    File “/usr/share/yum-cli/cli.py”, line 983, in installPkgs
    txmbrs = self.install(pattern=arg)
    File “/usr/lib/python2.7/site-packages/yum/__init__.py”, line 4825, in install
    mypkgs = self.pkgSack.returnPackages(patterns=pats,
    File “/usr/lib/python2.7/site-packages/yum/__init__.py”, line 1074, in
    pkgSack = property(fget=lambda self: self._getSacks(),
    File “/usr/lib/python2.7/site-packages/yum/__init__.py”, line 778, in _getSacks
    self.repos.populateSack(which=repos)
    File “/usr/lib/python2.7/site-packages/yum/repos.py”, line 347, in populateSack
    self.doSetup()
    File “/usr/lib/python2.7/site-packages/yum/repos.py”, line 157, in doSetup
    self.retrieveAllMD()
    File “/usr/lib/python2.7/site-packages/yum/repos.py”, line 88, in retrieveAllMD
    dl = repo._async and repo._commonLoadRepoXML(repo)
    File “/usr/lib/python2.7/site-packages/yum/yumRepo.py”, line 1479, in _commonLoadRepoXML
    result = self._getFileRepoXML(local, text)
    File “/usr/lib/python2.7/site-packages/yum/yumRepo.py”, line 1256, in _getFileRepoXML
    size=102400) # setting max size as 100K
    File “/usr/lib/python2.7/site-packages/yum/yumRepo.py”, line 1031, in _getFile
    **kwargs
    File “/usr/lib/python2.7/site-packages/urlgrabber/mirror.py”, line 448, in urlgrab
    return self._mirror_try(func, url, kw)
    File “/usr/lib/python2.7/site-packages/urlgrabber/mirror.py”, line 425, in _mirror_try
    return func_ref( *(fullurl,), opts=opts, **kw )
    File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1197, in urlgrab
    return self._retry(opts, retryfunc, url, filename)
    File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1086, in _retry
    r = apply(func, (opts,) + args, {})
    File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1191, in retryfunc
    _run_callback(opts.checkfunc, obj)
    File “/usr/lib/python2.7/site-packages/urlgrabber/grabber.py”, line 1054, in _run_callback
    return cb(obj, *arg, **karg)
    File “/usr/lib/python2.7/site-packages/yum/yumRepo.py”, line 1728, in _checkRepoXML
    self.gpg_import_func(self, self.confirm_func)
    File “/usr/lib/python2.7/site-packages/yum/__init__.py”, line 6418, in getKeyForRepo
    self._getAnyKeyForRepo(repo, repo.gpgdir, repo.gpgkey, is_cakey=False, callback=callback)
    File “/usr/lib/python2.7/site-packages/yum/__init__.py”, line 6337, in _getAnyKeyForRepo
    if hex(int(info[‘keyid’]))[2:-1].upper() in misc.return_keyids_from_pubring(destdir):
    File “/usr/lib/python2.7/site-packages/yum/misc.py”, line 599, in return_keyids_from_pubring
    for k in ctx.keylist():
    gpgme.GpgmeError: (7, 32870, u’Inappropriate ioctl for device’)

    Can you maybe help me?

    • Ravi Saive says:

      @Ruth,

      To fix, open and edit the file /etc/yum/pluginconf.d/rhnplugin.conf and change enabled to 0 and then do.

      # yum clean all
      # yum list
      
  2. Rutwik Bharadwaj says:

    Please have a look at /var/log/vbox-install.log to trace why the build process failed

    Run the following commands to build the kernel modules correctly : ( I am using RHEL -7)

    # systemctl status vboxdrv.service
    # yum install -y kernel-devel-3.10.0-693.el7.x86_64
    # systemctl status vboxdrv.service
    # systemctl start vboxdrv.service
    # systemctl status vboxdrv.service
    # service vboxdrv start
    # /usr/lib/virtualbox/vboxdrv.sh setup
    

    YOU ARE ALL SET TO GO.

  3. naman says:

    Hey i am stuck installing VirtualBox please help!
    What should i do getting this vboxdrv.sh: failed: modprobe vboxdrv failed. Please use ‘dmesg’ to find out why.

    Below mentioned is my /var/log/vbox-install.log file-
    make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/3.10.0-514.el7.x86_64/build -j4 modules
    arch/x86/Makefile:96: stack-protector enabled but compiler support broken
    Makefile:641: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
    make[1]: gcc: Command not found
    make[1]: warning: -jN forced in submake: disabling jobserver mode.
    test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
    echo >&2; \
    echo >&2 ” ERROR: Kernel configuration is invalid.”; \
    echo >&2 ” include/generated/autoconf.h or include/config/auto.conf are missing.”;\
    echo >&2 ” Run ‘make oldconfig && make prepare’ on kernel src to fix it.”; \
    echo >&2 ; \
    /bin/false)
    mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
    make -f scripts/Makefile.build obj=/tmp/vbox.0
    gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d -nostdinc -isystem -I./arch/x86/include -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -std=gnu89 -O2 -m64 -mno-mmx -mno-sse -mno-red-zone -mcmodel=kernel -maccumulate-outgoing-args -Wframe-larger-than=2048 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -I/lib/modules/3.10.0-514.el7.x86_64/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxdrv/ -I/tmp/vbox.0/vboxdrv/include -I/tmp/vbox.0/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -Wno-declaration-after-statement -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS -fno-omit-frame-pointer -fno-pie -DMODULE -D”KBUILD_STR(s)=#s” -D”KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)” -D”KBUILD_MODNAME=KBUILD_STR(vboxdrv)” -c -o /tmp/vbox.0/linux/.tmp_SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
    /bin/sh: gcc: command not found

  4. Lahcen z says:

    thanks, so quick so helpful ..

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *