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


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

查看所有标签

猜你喜欢:

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

可伸缩架构

可伸缩架构

【美】Lee Atchison / 张若飞、张现双 / 电子工业出版社 / 2017-7 / 65

随着互联网的发展越来越成熟,流量和数据量飞速增长,许多公司的关键应用程序都面临着伸缩性的问题,系统变得越来越复杂和脆弱,从而导致风险上升、可用性降低。《可伸缩架构:面向增长应用的高可用》是一本实践指南,让IT、DevOps和系统稳定性管理员能够了解到,如何避免应用程序在发展过程中变得缓慢、数据不一致或者彻底不可用等问题。规模增长并不只意味着处理更多的用户,还包括管理更多的风险和保证系统的可用性。作......一起来看看 《可伸缩架构》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具