打開 XCode,Preference > Downloads > Install Command Line Tools
去申請 Apple ID,到 Apple 開發者網站,找到適合你作業系統版本的 command line tools,下載並安裝。
到 Apple 開發者網站,找到 XCode 並安裝(注意作業系統版本),接著裝這個 GCC 工具包。
也可以只裝 GCC 工具包,但有很多軟體都需要安裝 XCode 才能編譯。
以上裝不起來可試試這個 Repo 裡的方法:
打開 XCode,Preference > Downloads > Install Command Line Tools
去申請 Apple ID,到 Apple 開發者網站,找到適合你作業系統版本的 command line tools,下載並安裝。
到 Apple 開發者網站,找到 XCode 並安裝(注意作業系統版本),接著裝這個 GCC 工具包。
也可以只裝 GCC 工具包,但有很多軟體都需要安裝 XCode 才能編譯。
以上裝不起來可試試這個 Repo 裡的方法: