Question

Following this https://stackoverflow.com/a/8372496/747050 I am trying to choose gcc version, installed with macport.

$port select --list gcc
Available versions for gcc:
    mp-gcc47
    none (active)

$port select --set gcc mp-gcc47
Selecting 'mp-gcc47' for 'gcc' failed: 
  symlink: /opt/local/etc/select/gcc/current -> mp-gcc47: file already exists

What should I do?

Was it helpful?

Solution

Solution was quite simple. One needs to remove the mentioned file.

$ sudo mv /opt/local/etc/select/gcc/current /opt/local/etc/select/gcc/current_saved
Password:
$ port select --set gcc mp-gcc47
Selecting 'mp-gcc47' for 'gcc' succeeded. 'mp-gcc47' is now active.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top