0

My question is a duplicate of VirtualBox not starting after kernel upgrade. My system configuration is as shown below.

reclusiarch@reclusiarch-Inspiron-7520:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
reclusiarch@reclusiarch-Inspiron-7520:~$ uname -a
Linux reclusiarch-Inspiron-7520 4.4.0-116-generic #140~14.04.1-Ubuntu SMP Fri Feb 16 09:25:20 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I had already purged the repository ( https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test) before discovering that I could not install gcc-5 without the said respository for Ubuntu 14.04. My question are as follows: Is there a way to revert my virtualbox installation back to a working installation and if so, how I proceed? Thanks for not closing this question.

corax
  • 3

1 Answers1

0

I have 14.04 and use virtualbox.

On my system, gcc-version returns

gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4

It comes from trusty-updates repository as shown here

gcc-4.8:
  Installed: 4.8.4-2ubuntu1~14.04.4
  Candidate: 4.8.4-2ubuntu1~14.04.4
  Version table:
 *** 4.8.4-2ubuntu1~14.04.4 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     4.8.2-19ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

After confirming that you have this version of the compiler, you need to remove and reinstall the latest kernel version using these commands (culled from the bug report)

sudo apt-get purge linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic linux-image-4.4.0-116-generic linux-image-extra-4.4.0-116-generic linux-signed-image-4.4.0-116-generic

sudo apt-get install linux-generic linux-signed-generic

and reboot into the new kernel.

Finally you need to rebuild the vbox kernel driver now that you have the right kernel and right compiler

sudo /sbin/vboxconfig 

There may be other compiler versions that work, but this one is proven to work.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • How do i switch back to gcc-4.8? My system automatically installed it but when I run gcc--version, it tells me that it cant find it? – corax Feb 28 '18 at 03:29
  • Look here https://askubuntu.com/questions/26498/choose-gcc-and-g-version Ale's answer may be best. – Organic Marble Feb 28 '18 at 04:34
  • Thanks. I have used the link. After rebooting, I tried running the command sudo apt-get linux-generic linux-signed-generic.It asks to install linux-image-3.13.0-142, is that normal/ok? – corax Feb 28 '18 at 04:42
  • On my system the kernel before virtualbox broke was 4.4.0-112 and installing the -116 caused the problem. If you didn't do the hwe update to 14.04 your system may be using a different set of kernels. Or there may be some other difference between our systems. what virtual packages were removed when you removed the -116 kernel-just reinstall them. – Organic Marble Feb 28 '18 at 04:46
  • I ran the hwe-support-status so it said that my system was supported till April 2019. Should I then go ahead and run the sudo apt-get linux-generic linux-signed-generic command or skip it and rebuild vbox kernel? Thanks. – corax Feb 28 '18 at 04:54
  • I don't think it will hurt to try that, it should rebuild it for the running kernel. – Organic Marble Feb 28 '18 at 04:57