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

Flutter -ios - pod install gRPC-C++ sed ssl issue

当我在我的 flutter 项目中安装 pod 时,我已经 运行 解决了这个问题。 (我将在几个小时后找到解决方案时自己回答这个问题 - 我希望它对以后阅读这篇文章的任何人都有帮助

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/>\
#else\
  #include <openssl/>\
#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/"\
#else\
  #include  "upb/"\
#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/.upb.h"\
#else\
  #include  ".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/>\
#else\
  #include <openssl/>\
#endif;g: No such file or directory

在 ios 文件夹中 运行

brew unlink gnu-sed

然后

Pod install

您需要删除 gnu-sed 路径变量。

/usr/local/Cellar/gnu-sed/4.8/libexec/gsed