3

Has recently upgraded my ubuntu from 16.04 to 18.04.1 LTS. When trying to run vmware I am getting this message: gcc version 8.2.0 not found so I checked gcc v. and I found: (Ubuntu 7.3.0-16ubuntu3). I tried to install gcc-8 following these steps:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-8

But I got this: The following packages have unmet dependencies: gcc-8: depends: cpp-8, gcc-8-base and libgcc-8-dev So I downloaded gcc-8 from here: https://packages.ubuntu.com/bionic/gcc-8 , But I don't know how to install it and if this is the right way?! Any suggestions or help is very appreciated - I don't know how to do it.

Build-essential: newest v.: 12.4ubuntu1 Kernel: 4.17.12-041712-generic

  • 1
    The second link you provided tells you the package is available in the 'universe' repository for bionic (18.04), so can be installed with sudo apt install gcc-8 (assuming you have 'universe' repository enabled; the dependencies are also found in universe) ie. apt will do the download for you & then install. Do you have 'universe' enabled? Refer help.ubuntu.com/community/Repositories/Ubuntu for help with repositories ; at the first picture you need to have the second box (universe) ticked. – guiverc Aug 4 '18 at 11:04
  • yes..I have universe enabled. I tried installing gcc-8 using aptitude and it seems installed(/usr/bin/gcc-8), but when I check the v. i still getting 7.3 so I tried to update the alternatives: sudo update-alternatives --config gcc , but i don't found the choice of gcc-8 (just gcc-5, 6, or 7)!!! any suggestions? – carl Aug 4 '18 at 11:25
  • I forgot to add this: I tried now sudo apt install gcc-8 and i am getting: gcc-8 is already the newest version (8.1.0-1ubuntu1)!!! – carl Aug 4 '18 at 11:28
  • I only use the default gcc, so this is from looking only. A dpkg-query -S gcc-8 shows the file "/usr/bin/gcc-8" is installed (& as you stated); so I'd guess gcc-8 would run it. Is that what you tried? Otherwise this was found online - askubuntu.com/questions/1028601/… (see answer) – guiverc Aug 4 '18 at 11:42
  • 1
    AFAIK additional versions of gcc will not overwrite the default /usr/bin/gcc symlink - if you gcc-8 to be the default, you will need to symlink it yourself (or place gcc under the control of update-alternatives). Otherwise, just use gcc-8 as the program name when you want to run it – steeldriver Aug 4 '18 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.