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

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

内容简介:最近在 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 的开源库也情有可原。遇到问题,就自己撸起手解决吧。


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

查看所有标签

猜你喜欢:

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

嵌入式系统开发之道

嵌入式系统开发之道

2011-12 / 69.00元

《嵌入式系统开发之道:菜鸟成长日志与项目经理的私房菜》用平易朴实的语言,以一个完整的嵌入式系统的开发流程为架构,通过一位“菜鸟”工程师与项目经理的诙谐对话,故事性地带出嵌入式系统概念及开发要素,并点出要成为一名称职的嵌入式系统工程师,在实际工作中所必须具备的各项知识及技能。 《嵌入式系统开发之道:菜鸟成长日志与项目经理的私房菜》可以分为三大部分:第1、3、4、17、18、19章和附录D为嵌入......一起来看看 《嵌入式系统开发之道》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具