折腾:
【未解决】Mac中iproxy端口转发连接iPhone6真机失败:Error connecting to device!
期间,需要去mac中安装最新版的libimobiledevice
希望可以解决iproxy连接iPhone6失败的问题。
删除旧的libimobiledevice,安装新的试试
brew install --HEAD libimobiledevice Updating Homebrew... ==> Auto-updated Homebrew! Updated 2 taps (homebrew/core and homebrew/cask). ==> Updated Formulae srtp Error: libimobiledevice 1.2.0_6 is already installed To install HEAD_6, first run `brew unlink libimobiledevice`. Warning: Skipping (old) /usr/local/Cellar/libimobiledevice/1.2.0_6 due to it being linked
根据提示试试
~ brew unlink libimobiledevice Unlinking /usr/local/Cellar/libimobiledevice/1.2.0_6... 39 symlinks removed
然后再去安装:
brew install --HEAD libimobiledevice ==> Installing dependencies for libimobiledevice: sqlite, python and libxml2 ==> Installing libimobiledevice dependency: sqlite ==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.31.1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/db/db7e3a6498bfdb4b4ceb8e8416020e2ad70de14975437f2e2a027485daeb2202?__gda__=exp=1582186649~hmac=6f92b0883f7ace258f7bb266896b6e0fc3555bf712646dbb5ab677960bda3f21&response-content-disposition ######################################################################## 100.0% ==> Pouring sqlite-3.31.1.mojave.bottle.tar.gz ==> Caveats sqlite is keg-only, which means it was not symlinked into /usr/local, because macOS provides an older sqlite3. If you need to have sqlite first in your PATH run: echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc For compilers to find sqlite you may need to set: export LDFLAGS="-L/usr/local/opt/sqlite/lib" export CPPFLAGS="-I/usr/local/opt/sqlite/include" For pkg-config to find sqlite you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/sqlite/3.31.1: 11 files, 4MB ==> Installing libimobiledevice dependency: python ==> Downloading https://homebrew.bintray.com/bottles/python-3.7.6_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/64/643d627c2b4fc03a3286c397d299284ef8ce2d4a832737e41175f297d4f0862e?__gda__=exp=1582186653~hmac=272b94934c04e7044429f8a64cbf31b7ca1d41656cee6657f4e0c5d1833ec0d5&response-content-disposition ######################################################################## 100.0% ==> Pouring python-3.7.6_1.mojave.bottle.tar.gz ==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.6_1/bin --install-lib=/usr/local/lib/python3.7/site-packages --single-version-externally- ==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.6_1/bin --install-lib=/usr/local/lib/python3.7/site-packages --single-version-externally- ==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.6_1/bin --install-lib=/usr/local/lib/python3.7/site-packages --single-version-externally- ==> Caveats Python has been installed as /usr/local/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to `python3`, `python3-config`, `pip3` etc., respectively, have been installed into /usr/local/opt/python/libexec/bin You can install Python packages with pip3 install <package> They will install into the site-package directory /usr/local/lib/python3.7/site-packages See: https://docs.brew.sh/Homebrew-and-Python ==> Summary 🍺 /usr/local/Cellar/python/3.7.6_1: 3,977 files, 60.8MB ==> Installing libimobiledevice dependency: libxml2 ==> Downloading https://homebrew.bintray.com/bottles/libxml2-2.9.10.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/47/472ed1a73a91c49fd9f39bd8cc4a7472b09c691659b3b9305c9da42ed35e1475?__gda__=exp=1582186667~hmac=dd7f1aaaa4a2cfdc6c852c79915584e3d49780b1f523a71764873df9675592db&response-content-disposition ######################################################################## 100.0% ==> Pouring libxml2-2.9.10.mojave.bottle.tar.gz ==> Caveats libxml2 is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble. If you need to have libxml2 first in your PATH run: echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.zshrc For compilers to find libxml2 you may need to set: export LDFLAGS="-L/usr/local/opt/libxml2/lib" export CPPFLAGS="-I/usr/local/opt/libxml2/include" For pkg-config to find libxml2 you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig" ==> Summary 🍺 /usr/local/Cellar/libxml2/2.9.10: 280 files, 10.5MB ==> Installing libimobiledevice --HEAD Error: An exception occurred within a child process: RuntimeError: /usr/local/opt/automake not present or broken Please reinstall automake. Sorry :(
结果却是
让重新安装automake
另外,此处没有iproxy
~ brew install iproxy --HEAD Error: No available formula with the name "iproxy" ==> Searching for a previously deleted formula (in the last month)... Warning: homebrew/core is shallow clone. To get complete history run: git -C "$(brew --repo homebrew/core)" fetch --unshallow Error: No previously deleted formula found. ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... ==> Searching taps on GitHub... Error: No formulae found in taps.
去重新安装automake试试
✘ xxx@xxx ~ brew reinstall automake ==> Reinstalling automake ==> Downloading https://homebrew.bintray.com/bottles/automake-1.16.1_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/0a/0a359c2385d0673ce1ab3cdaf39dd22af191f7b74732105ca5751e08a334e061?__gda__=exp=1582186811~hmac=3e22644c160207589a58007c8bb58dbcab4d3caf588d5a3a0d4c5731b0beced2&response-content-disposition ######################################################################## 100.0% ==> Pouring automake-1.16.1_1.mojave.bottle.tar.gz 🍺 /usr/local/Cellar/automake/1.16.1_1: 131 files, 3.4MB
然后再去
xxx@xxx ~ brew install --HEAD libimobiledevice Error: An exception occurred within a child process: RuntimeError: /usr/local/opt/libtool not present or broken Please reinstall libtool. Sorry :(
难道另外正在运行的iproxy,对此有影响?
那去停止了正在运行的iproxy,不对。已停止了。
再去:
✘ xxx@xxx ~ brew reinstall libtool ==> Reinstalling libtool ==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/c9/c92ab35c3706c255a36b733aa7a475159da9cf375c275d230fd6a7802a94e4dc?__gda__=exp=1582186905~hmac=6194cb0938f512cdc3cc3ca6a5cceb9862fd825d81f0246adeba558b4ebc2498&response-content-disposition ######################################################################## 100.0% ==> Pouring libtool-2.4.6_1.mojave.bottle.tar.gz ==> Caveats In order to prevent conflicts with Apple's own libtool we have prepended a "g" so, you have instead: glibtool and glibtoolize. ==> Summary 🍺 /usr/local/Cellar/libtool/2.4.6_1: 71 files, 3.7MB
重新试试
~ brew install --HEAD libimobiledevice ==> Cloning https://git.libimobiledevice.org/libimobiledevice.git Cloning into '/Users/xxx/Library/Caches/Homebrew/libimobiledevice--git'...
等待很久。
最后终于安装成功了:
xxx@xxx ~ brew install --HEAD libimobiledevice ==> Cloning https://git.libimobiledevice.org/libimobiledevice.git Cloning into '/Users/xxx/Library/Caches/Homebrew/libimobiledevice--git'... ==> Checking out branch master Already on 'master' Your branch is up to date with 'origin/master'. ==> ./autogen.sh ==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/libimobiledevice/HEAD-3d8d13f_6 --without-cython --enable-debug-code ==> make install 🍺 /usr/local/Cellar/libimobiledevice/HEAD-3d8d13f_6: 68 files, 1.1MB, built in 5 minutes 14 seconds Removing: /usr/local/Cellar/libimobiledevice/1.2.0_6... (66 files, 1MB) Removing: /Users/xxx/Library/Caches/Homebrew/libimobiledevice--1.2.0_6.mojave.bottle.tar.gz... (278.2KB)
然后:
xxx@xxx ~ iproxy --version usage: iproxy LOCAL_TCP_PORT DEVICE_TCP_PORT [UDID] xxx@xxx ~ iproxy --help usage: iproxy LOCAL_TCP_PORT DEVICE_TCP_PORT [UDID] xxx@xxx ~ which iproxy /usr/local/bin/iproxy
还是看不到版本。
【总结】
此处mac中:
brew reinstall automake brew reinstall libtool brew unlink libimobiledevice brew install --HEAD libimobiledevice
最终可以成功安装。