0

在此https://stackoverflow.com/a/8372496/747050之后,我正在尝试选择 gcc 版本,使用 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

我该怎么办?

4

1 回答 1

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.
于 2013-11-11T15:29:31.957 回答