Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
但是,它在我输入时起作用:
$ gcc-4.2
查找gcc-4.2安装位置并进入该目录:
gcc-4.2
$ cd $(which gcc-4.2)
检查是否有 gcc 符号链接:
$ ls gcc
如果没有,请创建它:
$ ln -s gcc-4.2 gcc
我明白了:在 Xcode > Preferences > Downloads 中安装命令行工具后一切都很好。