我正在尝试安装软件包:
cloud_firestore
,并且在安装依赖项时运行 pod install 时遇到错误 BoringSSL-GRPC
。 Downloading dependencies
-> Installing BoringSSL-GRPC (0.0.3)
> Git download
> Git download
$ /usr/bin/git clone https://github.com/google/boringssl.git /var/folders/2g/mfqr5f5148nd_w6g9f1g72p80000gn/T/d20200505-3960-17lhqyp --template=
[!] Error installing BoringSSL-GRPC
[!] /usr/bin/git clone https://github.com/google/boringssl.git /var/folders/2g/mfqr5f5148nd_w6g9f1g72p80000gn/T/d20200505-3960-17lhqyp --template=
Cloning into '/var/folders/2g/mfqr5f5148nd_w6g9f1g72p80000gn/T/d20200505-3960-17lhqyp'...
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:142:in `rescue in execute_command'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:139:in `execute_command'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/base.rb:154:in `block in executable'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/git.rb:79:in `block in clone'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:173:in `block in ui_sub_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:172:in `ui_sub_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/git.rb:77:in `clone'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/git.rb:45:in `download!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/base.rb:82:in `block in download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:157:in `block in ui_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:156:in `ui_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.3.0/lib/cocoapods-downloader/base.rb:80:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:108:in `download_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:75:in `download_request'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:171:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:154:in `block in uncached_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:181:in `in_tmpdir'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:153:in `uncached_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/downloader.rb:42:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/pod_source_installer.rb:69:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:557:in `install_source_of_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:508:in `block (2 levels) in install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:86:in `titled_section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:507:in `block in install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:490:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:490:in `install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:249:in `block in download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:248:in `download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:157:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
Cloning into '/var/folders/2g/mfqr5f5148nd_w6g9f1g72p80000gn/T/d20200505-3960-17lhqyp'...
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Error running pod install
Error launching application on iPhone 11.
我尝试了很多方法,但没有一个有效。然后,我重新启动我的机器。它有效。不明白原因!
将我使用的所有 Firebase 依赖项更改为此版本解决了我的问题
firebase_messaging: ^10.0.2
firebase_auth: ^1.4.1
cloud_firestore: ^2.2.1
firebase_storage: ^8.1.3
firebase_core: ^1.3.0
我有一个非常相似的问题。在这里为任何可能有帮助的人留下解决方案。
这很难相信。我根本原因是我使用的有线以太网适配器导致了这个问题。 wifi 和另外两个有线以太网适配器工作正常。
请注意,以太网适配器似乎工作正常。 git 克隆在命令行中工作正常,问题仅在 ruby Process.spawn 执行时才出现!
我遇到了一个略有不同的错误。我也得到了
gunzip: (stdin): unexpected end of file
,但我看到上面有几百行base64数据。
我在 OSX 上,结果发现我安装了 gnu coreutils,它的 base64 版本与下载的内容不兼容。我解决了这个问题:
brew uninstall coreutils
注意:我对这个问题打开了赏金,但没有成功,然后我找到了这个答案。
这个方法对我有用。
通过终止并关闭终端/代码编辑器来重新启动它,然后重新启动。
cd your-project-dir
cd ios
奔跑
吊舱安装
这将下载所有依赖项。可能需要一些时间,所以一定要等待。
NB: Ensure to have stable internet.
BoringSSL-GRPC
:# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'XXXXX' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'BoringSSL-GRPC'
end
pod install --repo-update
pod 'BoringSSL-GRPC'
并再次添加其他库...
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
pod 'Firebase/Functions'
pod 'Firebase/RemoteConfig'
pod 'FirebaseFirestoreSwift', '~> 7.9-beta'
...
这是我为解决该问题所做的事情:
下载最新版本的flutter,因为大部分软件包已经切换到flutter3。尝试删除 Podfile.lock、Pods 目录、.symlinks 目录和 runner.xcworkspace 文件。接下来运行
cd ios
,然后从 ios 路径运行 pod install --repo-update
。如果这不起作用,请尝试使缓存失效并重新启动 IDE。如果失败也尝试flutter pub cache clean
。请注意,它将删除您所有的 pub 缓存,因此您可能必须在所有项目上运行 pub get。
解决方案
尝试过的方法
我已经尝试了所有的解决方案,但没有一个对我有用,包括......
git config --global http.version HTTP/1.1