在https://stackoverflow.com/a/8372496/747050之后我试图选择与macport一起安装的gcc版本。
$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
我该怎么办?
答案 0 :(得分:2)
解决方案非常简单。一个人需要删除上面提到的文件。
$ 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.