Mac上编译libimobiledevice库

0、准备工作:

  使用brew或Mac Ports安装:libgnutls or openssl、 libplist 、libusb、libusbmuxd

1、下载代码:

  下载地址:https://github.com/libimobiledevice/libimobiledevice

2、编译、安装

  打开Mac终端,cd到代码保存目录,输入命令

  ./configure

  make

  sudo make install

3、使用

  第二步编译成功后,打开终端,输入:

  idevice_id -l

  

  如果返回设备UDID,说明安装成功!

 


问题解决:
1、报错:
“./configure: line 15055: syntax error near unexpected token `libusbmuxd,'
./configure: line 15055: `PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4)'”

解决方案:参考(http://libiphone.lighthouseapp.com/projects/27916/tickets/233-add-required-pkgm4)拷贝pkg.m4到m4目录下。

2、报错:
Requested 'libusbmuxd >= 1.0.8' but version of libusbmuxd is UNKNOWN

 解决方案:http://www.libimobiledevice.org/downloads/usbmuxd-1.0.8.tar.bz2 (install first)

 3、报错:
  Undefined symbols for architecture x86_64:
  "debugbuffer", referenced from:
  afcdispatch_packet in afc.o
  afcreceive_data in afc.o
  afcfile_lock in afc.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[2]: *** [libimobiledevice.la] Error 1
  make[1]: *** [all-recursive] Error 1
  make: *** [all] Error 2
  解决方案:参考(https://github.com/libimobiledevice/libimobiledevice/issues/10),在https://github.com/libimobiledevice/libimobiledevice链接中,下载trustdialog branch代码。

 4、
Installing libxml2

  

 下载libxml,地址:ftp://xmlsoft.org/libxml2/

  解压,然后

  ./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/2.3/   

  make   

  sudo make install

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
根据引用\[1\]和引用\[2\]的内容,安装libimobiledevice的步骤如下: 1. 克隆libimobiledevice的源代码:git clone https://github.com/libimobiledevice/libimobiledevice.git 2. 进入libimobiledevice目录:cd libimobiledevice 3. 运行autogen.sh脚本:./autogen.sh 4. 编译:make 5. 安装:sudo make install 6. 导出LD_LIBRARY_PATH环境变量:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 根据引用\[3\]的内容,在mac系统上安装libimobiledevice的步骤如下: 1. 安装plist:sudo apt-get install libxml2-dev python-dev python-pip,然后使用pip安装cython:sudo pip install cython 2. 克隆libplist的源代码:git clone https://github.com/libimobiledevice/libplist.git 3. 进入libplist目录:cd libplist 4. 运行autogen.sh脚本:./autogen.sh 5. 编译:make 6. 安装:sudo make install 7. 克隆libusbmuxd的源代码:git clone https://github.com/libimobiledevice/libusbmuxd.git 8. 进入libusbmuxd目录:cd libusbmuxd 9. 运行autogen.sh脚本:./autogen.sh 10. 编译:make 11. 安装:sudo make install 以上是在Linux系统上安装libimobiledevice的步骤。请根据您的操作系统选择适合的安装方式。 #### 引用[.reference_title] - *1* *3* [libimobiledevice 安装试用](https://blog.csdn.net/weixin_33727510/article/details/89595811)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [linux 上 libimobiledevice安装 & 连接设备](https://blog.csdn.net/jeanlu/article/details/106743718)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值