Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @youmych youmych revised this gist Jan 30, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion how-to-install-latest-gcc-on-linux-mint.txt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    These commands are based on a askubuntu answer http://askubuntu.com/a/581497
    These commands are based on a askubuntu answer http://askubuntu.com/a/581497 and https://askubuntu.com/questions/26498/choose-gcc-and-g-version
    To install gcc-7 (gcc-7.2.0), I had to do more stuff as shown below.
    USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
    ABSOLUTELY NO WARRANTY.
  2. @youmych youmych revised this gist Jan 30, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion how-to-install-latest-gcc-on-linux-mint.txt
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
    sudo apt-get update && \
    sudo apt-get install gcc-snapshot -y && \
    sudo apt-get update && \
    sudo apt-get install gcc-7 g++-7 gcc-6 g++-6 -y && \
    sudo apt-get install gcc-7 g++-7 gcc-6 g++-6 gcc-multilib -y && \
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 && \
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
    sudo apt-get install gcc-5 g++-5 -y && \
  3. @youmych youmych revised this gist Jan 30, 2018. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions how-to-install-latest-gcc-on-linux-mint.txt
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    These commands are based on a askubuntu answer http://askubuntu.com/a/581497
    To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
    To install gcc-7 (gcc-7.2.0), I had to do more stuff as shown below.
    USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
    ABSOLUTELY NO WARRANTY.

    @@ -11,19 +11,20 @@ sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
    sudo apt-get update && \
    sudo apt-get install gcc-snapshot -y && \
    sudo apt-get update && \
    sudo apt-get install gcc-6 g++-6 -y && \
    sudo apt-get install gcc-7 g++-7 gcc-6 g++-6 -y && \
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7 && \
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
    sudo apt-get install gcc-4.8 g++-4.8 -y && \
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8;
    sudo apt-get install gcc-5 g++-5 -y && \
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50 --slave /usr/bin/g++ g++ /usr/bin/g++-5;

    When completed, you must change to the gcc you want to work with by default. Type in your terminal:
    sudo update-alternatives --config gcc

    To verify if it worked. Just type in your terminal
    gcc -v

    If everything went fine you should see gcc 6.1.1 by the time I am writing this gist
    If everything went fine you should see gcc 7.2.0 by the time I am writing this gist

    Happy coding!

    See my blog post at https://www.application2000.com
    See blog post at https://www.application2000.com
  4. @youmych youmych renamed this gist Jan 30, 2018. 1 changed file with 0 additions and 0 deletions.
  5. @youmych youmych renamed this gist Jan 30, 2018. 1 changed file with 0 additions and 0 deletions.
  6. @youmych youmych revised this gist Jan 30, 2018. No changes.
  7. Alexandre ELISÉ revised this gist May 31, 2017. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions how-to-install-latest-gcc-on-ubuntu-lts.txt
    Original file line number Diff line number Diff line change
    @@ -16,12 +16,14 @@ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /u
    sudo apt-get install gcc-4.8 g++-4.8 -y && \
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8;

    When completed, you must change to the gcc you want to work with by default
    When completed, you must change to the gcc you want to work with by default. Type in your terminal:
    sudo update-alternatives --config gcc

    To verify if it worked. Just type in your terminal
    gcc -v

    If everything went fine you should see gcc 6.1.1 by the time I am writing this gist

    Happy coding!
    Happy coding!

    See my blog post at https://www.application2000.com
  8. Alexandre ELISÉ revised this gist May 14, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion how-to-install-latest-gcc-on-ubuntu-lts.txt
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ ABSOLUTELY NO WARRANTY.
    If you are still reading let's carry on with the code.

    sudo apt-get update && \
    sudo apt-get build-essentials software-properties-common -y && \
    sudo apt-get install build-essential software-properties-common -y && \
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
    sudo apt-get update && \
    sudo apt-get install gcc-snapshot -y && \
  9. Alexandre ELISÉ created this gist May 14, 2016.
    27 changes: 27 additions & 0 deletions how-to-install-latest-gcc-on-ubuntu-lts.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    These commands are based on a askubuntu answer http://askubuntu.com/a/581497
    To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
    USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
    ABSOLUTELY NO WARRANTY.

    If you are still reading let's carry on with the code.

    sudo apt-get update && \
    sudo apt-get build-essentials software-properties-common -y && \
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
    sudo apt-get update && \
    sudo apt-get install gcc-snapshot -y && \
    sudo apt-get update && \
    sudo apt-get install gcc-6 g++-6 -y && \
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
    sudo apt-get install gcc-4.8 g++-4.8 -y && \
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8;

    When completed, you must change to the gcc you want to work with by default
    sudo update-alternatives --config gcc

    To verify if it worked. Just type in your terminal
    gcc -v

    If everything went fine you should see gcc 6.1.1 by the time I am writing this gist

    Happy coding!