Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sshepel/418569d80f1b4941a179e47aadf326c6 to your computer and use it in GitHub Desktop.

Select an option

Save sshepel/418569d80f1b4941a179e47aadf326c6 to your computer and use it in GitHub Desktop.

Revisions

  1. @jlblancoc jlblancoc revised this gist Feb 20, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Install_gcc7_ubuntu_16.04.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@ Run the following in the terminal:

    Install the gcc-7 packages:

    sudo apt-get install -y software-properties-common
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt update
    sudo apt install g++-7 -y
  2. @jlblancoc jlblancoc revised this gist Feb 20, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion Install_gcc7_ubuntu_16.04.md
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,8 @@ Set it up so the symbolic links `gcc`, `g++` point to the newer version:
    gcc --version
    g++ --version

    # This one if you want the **all** toolchain programs (with the triplet names) to also point to gcc-7:
    # This one if you want the **all** toolchain programs (with the triplet names) to also point to gcc-7.
    # For example, this is needed if building Debian packages.
    # If you are already are root (e.g. inside a docker image), remove the "sudo" below.
    ls -la /usr/bin/ | grep -oP "[\S]*(gcc|g\+\+)(-[a-z]+)*[\s]" | xargs sudo bash -c 'for link in ${@:1}; do ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 7

  3. @jlblancoc jlblancoc revised this gist Feb 20, 2019. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions Install_gcc7_ubuntu_16.04.md
    Original file line number Diff line number Diff line change
    @@ -14,3 +14,7 @@ Set it up so the symbolic links `gcc`, `g++` point to the newer version:
    gcc --version
    g++ --version

    # This one if you want the **all** toolchain programs (with the triplet names) to also point to gcc-7:
    # If you are already are root (e.g. inside a docker image), remove the "sudo" below.
    ls -la /usr/bin/ | grep -oP "[\S]*(gcc|g\+\+)(-[a-z]+)*[\s]" | xargs sudo bash -c 'for link in ${@:1}; do ln -s -f "/usr/bin/${link}-${0}" "/usr/bin/${link}"; done' 7

  4. @jlblancoc jlblancoc revised this gist Mar 11, 2018. 1 changed file with 8 additions and 9 deletions.
    17 changes: 8 additions & 9 deletions Install_gcc7_ubuntu_16.04.md
    Original file line number Diff line number Diff line change
    @@ -2,16 +2,15 @@ Run the following in the terminal:

    Install the gcc-7 packages:

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt update
    sudo apt install g++-7 -y
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt update
    sudo apt install g++-7 -y

    Set it up so the symbolic links `gcc`, `g++` point to the newer version:

    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
    --slave /usr/bin/g++ g++ /usr/bin/g++-7
    sudo update-alternatives --config gcc
    gcc --version
    g++ --version

    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
    --slave /usr/bin/g++ g++ /usr/bin/g++-7
    sudo update-alternatives --config gcc
    gcc --version
    g++ --version

  5. @jlblancoc jlblancoc renamed this gist Mar 11, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. @jlblancoc jlblancoc revised this gist Mar 11, 2018. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -2,16 +2,16 @@ Run the following in the terminal:

    Install the gcc-7 packages:

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt update
    sudo apt install g++-7 -y
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt update
    sudo apt install g++-7 -y

    Set it up so the symbolic links `gcc`, `g++` point to the newer version:

    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
    --slave /usr/bin/g++ g++ /usr/bin/g++-7
    sudo update-alternatives --config gcc
    gcc --version
    g++ --version
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
    --slave /usr/bin/g++ g++ /usr/bin/g++-7
    sudo update-alternatives --config gcc
    gcc --version
    g++ --version


  7. @jlblancoc jlblancoc created this gist Mar 11, 2018.
    17 changes: 17 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    Run the following in the terminal:

    Install the gcc-7 packages:

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt update
    sudo apt install g++-7 -y

    Set it up so the symbolic links `gcc`, `g++` point to the newer version:

    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
    --slave /usr/bin/g++ g++ /usr/bin/g++-7
    sudo update-alternatives --config gcc
    gcc --version
    g++ --version