close

透過homebrew安裝GCC

1.安裝homebrew

   參考資料:homebrew Mac OS X下新的軟件包管理工具

   利用 git Git Installer 1.8.4.2- OS X Snow Leopard - intel Universal

   根據安裝說明檔git會安裝在/usr/local底下

   cd /usr/local

   sudo git init <-這行若沒有 sudo 會產生fatal cannot tell cwd no such file or directory的錯誤

   sudo git remote add origin git://github.com/mxcl/homebrew.git

   sudo pull origin master

   完成homebrew安裝

2.安裝GCC

   參考資料:Mac安裝GCC

   sudo brew tap homebrew/versions <-一開始少打了個s,讓我嘗盡苦頭

   Then maybe you have to input your github username and password

   sudo brew install gcc48

GCC  

這張不是成功圖,但我一直以為是,沒想到愚昧至極的我就這樣開心去跨年惹

還好今天有嘗試compile c code 這才發現GCC根本沒安裝好

看到第一行的警告訊息 

Warning: no develpoer tools installed. you should install the Command Line Tools.

The standalone package can be obtained from...

 一開始不知道這是什麼以為是警告就略過了,沒想到竟然是因為這個無法安裝GCC

參考資料:GCC on mac without Xcode

從apple dev download 網址下載Command Line Tools就可以了

Apple dev download site

successforGCCinstalled  

arrow
arrow
    文章標籤
    mac gcc homebrew git github
    全站熱搜

    glitterHsin 發表在 痞客邦 留言(0) 人氣()