libimobiledevice安裝(Mac)

升級macOS High Sierra 和 Xcode9后,原來idevicesyslogideviceinstaller總是出現報錯:

Could not connect to lockdownd. Exiting.

在嘗試了sudo chmod 777 /var/db/lockdown無果后,決定重新安裝一次。步驟基本按照GitHub上的README。

另,如果只是ideviceinstaller出現問題,可以嘗試按下面方法重裝:

brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew link --overwrite libimobiledevice
brew install ideviceinstaller
brew link --overwrite ideviceinstaller

安裝libimobiledevice依賴庫

安裝依賴庫,可以通過HomeBrew。

libplist
libtool
usbmuxd(或libusbmuxd)
openssl (版本需要大于0.9.8) 或 GnuTLS

# 以下這些依賴基本系統已經有了
make
autoheader
automake
autoconf
pkg-config
gcc 或 clang

編譯安裝libimobiledevice

git clone https://github.com/libimobiledevice/ideviceinstaller.git
cd ideviceinstaller
./autogen.sh
make
sudo make install

我在./autogen.sh這一步就遇上了問題,我Mac上的兩個openssl版本都是1.0以上,但還是報openssl版本錯誤:

checking for openssl >= 0.9.8... no
configure: error: OpenSSL support explicitly requested but OpenSSL could not be found

解決方式是,根據上面的依賴庫介紹,可以使用openssl 或 GnuTLS,所以我們使用另一個。

./autogen.sh --disable-openssl

會提示使用GnuTLS會需要安裝另一個依賴,安裝后重試即可。

到此libimobiledevice安裝完成,實際上它也是可以通過HomeBrew安裝的,但是我在安裝的過程中brew始終報錯安裝失敗,所以通過這種方法安裝。

同樣,安裝ideveceinstaller也可以用兩種方式安裝。

# 1. 通過HomeBrew
brew install ideviceinstaller

# 2. 
sudo apt-get install libzip-dev
git clone https://github.com/libimobiledevice/ideviceinstaller.git
cd ideviceinstaller
./autogen.sh
make
sudo make install
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容