ios - Flutter -ios - pod install gRPC-C++ sed ssl 问题

标签 ios flutter sed cocoapods

当我在我的 flutter 项目中执行 pod install 时,我一直在解决这个问题。 (我将在几个小时后找到解决方案时自己回答这个问题 - 我希望这对将来阅读本文的人有所帮助

Installing firebase_storage (5.0.1)
Installing flutter_local_notifications (0.0.1)
Installing flutter_plugin_android_lifecycle (0.0.1)
Installing fluttertoast (0.0.2)
Installing gRPC-C++ (1.28.2)
[!] /bin/bash -c 
set -e
sed -E -i '' 's;#include <openssl/(.*)>;#if COCOAPODS==1\
  #include <openssl_grpc/\1>\
#else\
  #include <openssl/\1>\
#endif;g' $(find src/core -type f \( -path '*.h' -or -path '*.cc' \) -print | xargs grep -H -c '#include <openssl_grpc/' | grep 0$ | cut -d':' -f1)
    find src/core/ third_party/upb/ -type f \( -name '*.h' -or -name '*.c' -or -name '*.cc' \) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "upb/(.*)";#if COCOAPODS==1\
  #include  "third_party/upb/upb/\1"\
#else\
  #include  "upb/\1"\
#endif;g'
    find src/core/ third_party/upb/ -type f -name '*.grpc_back' -print0 | xargs -0 rm
    find src/core/ src/cpp/ -type f \( -name '*.h' -or -name '*.c' -or -name '*.cc' \) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "(.*).upb.h";#if COCOAPODS==1\
  #include  "src/core/ext/upb-generated/\1.upb.h"\
#else\
  #include  "\1.upb.h"\
#endif;g'
    find src/core/ src/cpp/ -type f -name '*.grpc_back' -print0 | xargs -0 rm

sed: can't read s;#include <openssl/(.*)>;#if COCOAPODS==1\
  #include <openssl_grpc/\1>\
#else\
  #include <openssl/\1>\
#endif;g: No such file or directory

最佳答案

在 ios 文件夹中运行

brew unlink gnu-sed
然后
Pod install

关于ios - Flutter -ios - pod install gRPC-C++ sed ssl 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64844433/

相关文章:

ios - UIActivityIndi​​catorView 仅在 Release模式下崩溃

android - flutter 和 VSCode : Gradle Build Error

python - 使用Python re的多模式嵌套正则表达式

ios - Swift 3.0 async Dispatch.global 不运行

ios - 使用 dequeueReusableCellWithIdentifier :forIndexPath:? 时的新单元格或现有单元格

ios - 如何使用泛型协议(protocol)作为变量类型

flutter - 在其他页面打开抽屉

android - Flutter:前台通知在 Firebase 消息传递中不起作用

sed - 提取字符串之间的子字符串

vim - 如何删除所有包含少于 n 个项目的行