A instalação de gcc-7
do toolchain-r
PPA deve não afetar sua instalação padrão de gcc
- ele instalará /usr/bin/gcc-7
e todos os arquivos de suporte, mas não vinculará simbolicamente /usr/bin/gcc
para isso.
Por exemplo, dado
$ gcc --version
gcc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc-7 --version
No command 'gcc-7' found, did you mean:
Command 'gcc-6' from package 'gccgo-6' (main)
Command 'gcc-5' from package 'gcc-5' (main)
Command 'gcc-5' from package 'hardening-wrapper' (universe)
gcc-7: command not found
Então
$ apt-cache policy gcc-7
gcc-7:
Installed: (none)
Candidate: 7.2.0-1ubuntu1~16.04
Version table:
7.2.0-1ubuntu1~16.04 500
500 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial/main amd64 Packages
$ sudo apt install gcc-7
Resultados em
$ apt-cache policy gcc-7
gcc-7:
Installed: 7.2.0-1ubuntu1~16.04
Candidate: 7.2.0-1ubuntu1~16.04
Version table:
*** 7.2.0-1ubuntu1~16.04 500
500 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
$ gcc-7 --version
gcc-7 (Ubuntu 7.2.0-1ubuntu1~16.04) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mas
$ gcc --version
gcc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.