2016年7月7日 星期四

Macbook 工作環境準備


記錄在Mac上建立工作環境的流程供未來參考。

Mac OS X 程式開發環境準備

Prepare software development environment for Mac OS X


Step 1. Install xcode
 
Xcode can be found in Apple App Store.

Step 2. Install xcode command line tools
 
%>  xcode-select install

Step 3. Install Mac Ports

Refer MacPort website to install MacPort: https://www.macports.org

When ports is installed. You can install develop tools from open-source community via ports.
 

使用Mac Ports安裝Open source 開發工具

Command Notes to install open-source development tools using Mac Ports 


1. Update port database 

%> sudo port selfupdate

2. Upgrade installed port version 

%> sudo port upgrade outdated

3. Search port/package on Mac Ports

%> port search --name --glob '**'

Example: %> port search --name --glob '*doxygen*'

4. Install port/packet 

%> sudo port install  

Example: %> sudo port install doxygen

Troubleshooting 

1. Installing port fail

某些Package 的安裝過程需要使用到xcode command line tool, 如果安裝command line tool 前就開始安裝這些Package,那麼安裝就會失敗,發生類似這種問題時即使重新若重新使用port install command 也無法問題時,可以試著使用port  clean 將安裝過程的產生的相關檔案(尤其是configuration file)清除乾淨後再重新安裝。
 
Note: 重複執行port install不一定會重新產生正確的configuration file。

%> port clean
%> port install


   





 

沒有留言:

張貼留言