xcode-select --install
. This will install the command line tools for Xcode, and you will be asked to perform the install using the typical application installation process. This may include asking you for your password.sudo
` command, and before we do so, I’m going to give you a little warning. Using the sudo command can do major damage to your computer if you aren’t careful, so please type the following exactly as shown to do the install: sudo tar -xvf gcc-5.3-bin.tar -C /
. If your downloaded package ends in .tar.gz
, you’ll need to add z
to the list of flags after the tar
command. This should take just a moment and will install the compilers in /usr/local
.gcc -v
. It should show version 5.3. You can try the same with the Fortran compiler by typing gfortran -v
. If they return the compiler versions as expected, you’re all set. Enjoy./Applications/Utilities
, hopefully you know that).bashrc
file rather than the .bash_profile
file. To confirm, do the following:.bash_profile
file or the .bashrc
. If the new gcc version is not returned when typing.bashrc
file..bashrc
that points to .bash_profile
by typing