使用CocoaPods配置iOS百度地圖sdk問題記錄20191024

一、在Podfile中加入添加庫名

pod 'BaiduMapKit' #百度地圖SDKgit

二、安裝百度地圖

pod installgithub

出現問題:ruby

[!] Error installing BaiduMapKitcurl

[!] /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.0url

 

Cloning into '/var/folders/66/cn9r2_js64116n5r3rjcv3qm0000gn/T/d20191024-3181-1lhmczd'...spa

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54code

fatal: the remote end hung up unexpectedlycdn

fatal: early EOFrem

fatal: index-pack failedit

三、從新安裝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)

四、查看當前的ruby源並移除,添加新的ruby的軟件源

gem sources -l

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

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

五、更新gem

gem update --system

六、再次安裝CocoaPods

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

pod setup

七、再次安裝百度地圖

pod install

出現問題:

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

八、清空repo

pod repo remove master

九、再次安裝百度地圖

pod install

成功。

 

end

相關文章
相關標籤/搜索