Friday, September 13, 2019

apt - How do I install a specific lower minor version of gcc using package manager?

I am running an Ubuntu 14.04-4 64bit. gcc --version returns


(Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4

Yet, I need version 4.8.2-10.
What I tried:



  1. I found the specific gcc version in a debian snapshot repository.

  2. I adapted my /etc/apt/sources.list to contain the following two lines only:


    deb http://snapshot.debian.org/archive/debian/20131213T160912Z unstable main
    deb-src http://snapshot.debian.org/archive/debian/20131213T160912Z unstable main

  3. As suggested here I added the required key


  4. I did sudo apt-get -o Acquire::Check-Valid-Until=false update

  5. sudo apt-get remove gcc

  6. sudo apt-get install gcc. This returned:


     ...
    Preparing to unpack .../gcc_4%3a4.8.2-1_amd64.deb ...
    Unpacking gcc (4:4.8.2-1) ...
    Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
    Setting up gcc (4:4.8.2-1) ...


Unfortunately, gcc --version still returned
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4


Removing and re-installing gcc-4.8 and gcc-4.8-base returned in an error (unmet dependencies) or a strange warning (uninstalling more than 700mb).


How can I install this specific gcc version?

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...