Flutter小记-01

322 阅读1分钟

在配置Flutter环境的时候报了以下错误: 执行brew install --HEAD libimobiledevice

==> Cloning https://git.libimobiledevice.org/libimobiledevice.git
Updating /Users/luo/Library/Caches/Homebrew/libimobiledevice--git
==> Checking out branch master
Reinitialized existing Git repository in /private/tmp/libimobiledevice-20180518-22189-1ltidjo/.git/
==> ./autogen.sh
Last 15 lines from /Users/luo/Library/Logs/Homebrew/libimobiledevice/01.autogen.sh:
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... clang++ -E
checking for ld used by clang++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for clang++ option to produce PIC... -fno-common -DPIC
checking if clang++ PIC flag -fno-common -DPIC works... yes
checking if clang++ static flag -static works... no
checking if clang++ supports -c -o file.o... yes
checking if clang++ supports -c -o file.o... (cached) yes
checking whether the clang++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.4.0 dyld
checking how to hardcode library paths into programs... immediate
./configure: line 15993: syntax error near unexpected token `libusbmuxd,'
./configure: line 15993: `PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= $LIBUSBMUXD_VERSION)'

READ THIS: https://docs.brew.sh/Troubleshooting

解决方法:

git clone https://github.com/libimobiledevice/libusbmuxd

将下载下来的所有文拖拽覆盖以下目录:

/usr/local/Cellar/libimobiledevice/1.2.0_2