MacOS 下安装 flutter 遇到的一个依赖问题

栏目: IOS · 发布时间: 5年前

内容简介:最近在 MacOSX 上安装 flutter 也遇到一些问题。不是 MacOS Mojave 的问题,而是 flutter 依赖的一个开源库,它的依赖树出现版本不兼容问题。运行[!] iOS toolchain - develop for iOS devices (Xcode 10.0)

最近在 MacOSX 上安装 flutter 也遇到一些问题。不是 MacOS Mojave 的问题,而是 flutter 依赖的一个开源库,它的依赖树出现版本不兼容问题。

运行 flutter doctor 出现如下提示。

[!] iOS toolchain - develop for iOS devices (Xcode 10.0)

✗ libimobiledevice and ideviceinstaller are not installed. To install, run:

brew install –HEAD libimobiledevice

brew install ideviceinstaller

✗ ios-deploy not installed. To install:

brew install ios-deploy

✗ CocoaPods not installed.

CocoaPods is used to retrieve the iOS platform side’s plugin code that responds to your plugin usage on the Dart side.

Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.

For more info, see https://flutter.io/platform-plugins

To install:

brew install cocoapods

pod setup

按照提示,运行 brew install --HEAD libimobiledevice 出现如下提示。

checking for libusbmuxd >= 1.1.0… no

configure: error: Package requirements (libusbmuxd >= 1.1.0) were not met:

Requested ‘libusbmuxd >= 1.1.0’ but version of libusbmuxd is 1.0.10

Consider adjusting the PKG_CONFIG_PATH environment variable if you

installed software in a non-standard prefix.

Alternatively, you may set the environment variables libusbmuxd_CFLAGS

and libusbmuxd_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

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

brew 发现 usbmuxd 这个库最高版本就是 1.0.10,github 上最新 release 版本也是 1.0.10。压根儿就没有 1.1.0 这个版本存在。

不过细看,发现 usbmuxd 这个库的最新版本,就是这个 1.0.10 是 2014 年发布的,算是老古董了。

所以安装 usbmuxd 的 head 版本试试。

brew unlink usbmuxd  # 否则会 reinstall 失败
brew reinstall --HEAD usbmuxd  # 直接从 github 的 master HEAD 安装

brew install --HEAD libimobiledevice

然后,就成了。囧rz…

依赖树的问题,万一遇到,还是得手动一个一个解决。没办法。

一个结论就是,要用 brew install —HEAD ,就要忍受 nightly 的不稳定,这是必然付出的代价。flutter 现在还是 beta 版本,依赖 nightly 的开源库也情有可原。遇到问题,就自己撸起手解决吧。


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

埃隆·马斯克传

埃隆·马斯克传

陆西 / 重庆出版社 / 2014-7 / 38.00元

埃隆·马斯克(Elon Musk)1971年出生于南非,毕业于美国宾夕法尼亚大学,工程师、企业家、亿万富翁。最成功的全球网上支付平台Paypal创始人之一,现任美国商业航天企业空间探索技术公司(SpaceX)CEO,电动车生产企业特斯拉汽车(Tesla Motors)CEO,光伏发电服务供应企业SolarCity董事长。如今他被视为经济危机后美国创新与科技实力的新象征。 今天PayPal依然......一起来看看 《埃隆·马斯克传》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具