重新编译libimobiledevice以修复Homebrew版 版本过低无法使用

刚踩的坑
先从git@github.com:libimobiledevice/libimobiledevice.git clone代码

然后

brew install libtool openssl pkg-config libplist make automake 
cp -R $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/usr/include/openssl /usr/local/include/
 
cd libimobiledevice && ./autogen.sh && make && make install

即可安装libimobiledevice1.2.1而不是homebrew的1.2.0

1 个赞

在上面的路径里找不到openssl

已经在 openssl 安装目录找到了:)

编译不成功,求指点。

看起来和 openssl 有关,但是不知道 openssl 怎样配置,我是直接把 openssl 目录下的 include 目录里的 openssl 复制到/usr/include/下了。

这是link失败啊

张总,这要怎么办?

咦,好像 brew install from source,可以安装1.2.1版本?

诶是吗。我直接代码编译了orz

其实也是代码编译,只是指定了从最新的Head开始编译。
俺也是1.2.0版本死活连接不上设备后,才知道的。

我知道我的意思是这个方法节省了自己安装依赖什么的麻烦。