升級macOS High Sierra 和 Xcode9后,原來idevicesyslog
和ideviceinstaller
總是出現報錯:
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