我的Mac OS X是10.6.8 snow leopard,在wireshark官網下載了OS X 10.6 and later Intel 64-bit .dmg
成功安裝。
但是運行的時候wireshark主界面卻遲遲不出現,切換到shell下執行wireshark命令,出現如下錯誤
1、MacBook-Pro:MacOS $ wireshark
2012-07-16 11:46:23.304 defaults[667:903]
The domain/default pair of (kCFPreferencesAnyApplication, AppleAquaColorVariant) does not exist
2012-07-16 11:46:23.311 defaults[668:903]
The domain/default pair of (kCFPreferencesAnyApplication, AppleHighlightColor) does not exist
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
Referenced from: /Applications/Wireshark.app/Contents/Resources/bin/wireshark-bin
Reason: Incompatible library version: wireshark-bin requires version 14.0.0 or later, but libfreetype.6.dylib provides version 13.0.0
google了下,找到這麼一篇文章--http://azhari.harahap.us/2011/05/wireshark-on-mac-os-incompatible-library-version-wireshark-bin-requires-version-13-0-0-or-later-but-libfreetype-6-dylib-provides-version-10-0-0/
2、安裝port
需要用port安裝freetype的庫,但是發現port又沒有安裝,到這裡去下載了http://distfiles.macports.org/MacPorts/MacPorts-1.9.2-10.6-SnowLeopard.dmg,執行安裝時,又提示需要安裝xcode,原來xcode是蘋果公司向開發人員提供的集成開發環境,用於開發Mac OS X和iOS的應用程序。
沒辦法,花了一個小時的時間去到這裡去下載了個http://adcdownload.apple.com/Developer_Tools/xcode_4.2_for_snow_leopard/xcode_4.2_for_snow_leopard.dmg,悲催的是安裝時提示錯誤,如下
不過幸運的是找了個文章--http://stackoverflow.com/questions/10029270/install-xcode-4-2-for-snow-leopard-fails
只要修改系統的日期為2012年3月26日之前即可,成功安裝!
接下來終於可以利用sudo port install 安裝freetype了,可安裝時提示