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

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

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


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

查看所有标签

猜你喜欢:

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

运营其实很简单:互联网运营进阶之道

运营其实很简单:互联网运营进阶之道

郑文博 / 人民邮电出版社 / 2018-2 / 49.80元

为了帮助从事运营或即将从事运营的广大读者更好、更快地了解运营、学习运营、入职运营,本书详细阐述运营对于用户、企业的帮助,同时以单个理论点 单个实战案例的方式详细分析了社群运营、活动运营、新媒体运营、内容运营、渠道运营、精细化运营、场景化运营、用户化运营、商业化运营等模块及运营工作、渠道整合、社群知识、渠道优化、SOP流程等细节,力求让读者在求职路上快速上手,在迷茫途中快速定位。 《运营其实很简单 ......一起来看看 《运营其实很简单:互联网运营进阶之道》 这本书的介绍吧!

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

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

HSV CMYK互换工具