Mac上編譯libimobiledevice庫

0、準備工做:python

  使用brew或Mac Ports安裝:libgnutls or openssl、 libplist 、libusb、libusbmuxdgit

一、下載代碼:github

  下載地址:https://github.com/libimobiledevice/libimobiledeviceweb

二、編譯、安裝app

  打開Mac終端,cd到代碼保存目錄,輸入命令iphone

  ./configureide

  makeui

  sudo make install

三、使用spa

  第二步編譯成功後,打開終端,輸入:

  idevice_id -l
debug

  

  若是返回設備UDID,說明安裝成功!

 


問題解決:
一、報錯:
「./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目錄下。

二、報錯:
Requested 'libusbmuxd >= 1.0.8' but version of libusbmuxd is UNKNOWN

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

 三、報錯:
  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代碼。

 四、
Installing libxml2

  

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

  解壓,而後

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

  make   

  sudo make install

相關文章
相關標籤/搜索