欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  移动技术

使用CocoaPods配置iOS百度地图sdk问题记录20191024

程序员文章站 2022-05-03 13:41:39
1、在Podfile中加入添加库名 pod 'BaiduMapKit' #百度地图SDK 2、安装百度地图 pod install 出现问题: [!] Error installing BaiduMapKit [!] /usr/local/bin/git clone https://github.c ......

1、在podfile中加入添加库名

pod 'baidumapkit' #百度地图sdk

2、安装百度地图

pod install

出现问题:

[!] error installing baidumapkit

[!] /usr/local/bin/git clone https://github.com/baidulbs/baidumapkit.git /var/folders/66/cn9r2_js64116n5r3rjcv3qm0000gn/t/d20191024-3181-1lhmczd --template= --single-branch --depth 1 --branch 5.0.0

 

cloning into '/var/folders/66/cn9r2_js64116n5r3rjcv3qm0000gn/t/d20191024-3181-1lhmczd'...

error: rpc failed; curl 56 libressl ssl_read: ssl_error_syscall, errno 54

fatal: the remote end hung up unexpectedly

fatal: early eof

fatal: index-pack failed

3、重新安装cocoapods

sudo gem install -n /usr/local/bin cocoapods

出现问题:

error:  could not find a valid gem 'cocoapods' (>= 0), here is why:

          unable to download data from https://gems.ruby-china.org/ - bad response not found 404 (https://gems.ruby-china.org/specs.4.8.gz)

4、查看当前的ruby源并移除,添加新的ruby的软件源

gem sources -l

gem sources --remove https://gems.ruby-china.org/

gem sources --add https://gems.ruby-china.com/

5、更新gem

gem update --system

6、再次安装cocoapods

sudo gem install -n /usr/local/bin cocoapods

pod setup

7、再次安装百度地图

pod install

出现问题:

[!] couldn't determine repo type for url: `https://cdn.cocoapods.org/`: execution expired

8、清空repo

pod repo remove master

9、再次安装百度地图

pod install

成功。

 

end