cocoapods安装webp
cocoapods安装webp失败 :
[!] Error installing libwebp
[!] /usr/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/d7/_5vttg6x6hb5kq0jx0dmknwr0000gn/T/d20200602-86123-14pz5wj --template= --single-branch --depth 1 --branch v1.1.0
Cloning into '/var/folders/d7/_5vttg6x6hb5kq0jx0dmknwr0000gn/T/d20200602-86123-14pz5wj'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
解决办法:
1,查看mac中cocoapods 本地库路径:
终端执行 :
$pod repo
找到
maste- Type: git (master)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/myMac/.cocoapods/repos/master
2,在本地库中, 并找到对应的libwebp版本的文件
$ find /Users/myMac/.cocoapods/repos/master -iname libwebp
此时终端窗口显示:/Users/myMac/.cocoapods/repos/master/Specs/1/9/2/libwebp
进入这个路径(前往文件夹),选择你需要下载的版本号,打开libwebp.podspec.json文件:
libwebp修改文件中git source 地址为,用此行:
https://github.com/webmproject/libwebp.git
替换下图中标记的代码
替换代码可以看到mirrored from https://chromium.googlesource.com/webm/libwebp,再执行pod install 解决。