參考
- OS X EI Captian 編譯 libimobiledevice 錯誤記錄以及解決方法~~~](http://www.dllhook.com/post/169.html)
- 重新編譯libimobiledevice以修復Homebrew版 版本過低無法使用
起因
brew上編譯好的老版本1.2.0配合iOS10和Xcode8無法識別設備坛梁,只好自己動手編譯新版本耕蝉。
而brew install --HEAD libimobiledevice
會報distutils的錯呻疹,所以只能從源碼編譯了示弓。
步驟
- clone源碼
git clone https://github.com/libimobiledevice/libimobiledevice
- 卸載舊的libimobiledevice
brew uninstall libimobiledevice
- 安裝配置編譯環(huán)境
brew install libtool openssl pkg-config libplist make automake
在/.bashrc或/.zshrc中配置openssl
export PATH=/usr/local/opt/openssl/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:$LD_LIBRARY_PATH
export CPATH=/usr/local/opt/openssl/include:$LD_LIBRARY_PATH
如果提示找不到-lssl
xcode-select --install
sudo xcode-select --switch /Library/Developer/CommandLineTools
- 切換到源碼目錄下執(zhí)行安裝
CFLAGS=-I/usr/local/opt/openssl/include LDFLAGS=-L/usr/local/opt/openssl/lib ./autogen.sh
make
make install
- 再試試
idevicesyslog
吧 - 記得還原xcode
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer