[转载文章]
iOS使用cocoapods 安装libwebp0.6.0遇到Error installing libwebp
[!] Error installing libwebp
[!] /usr/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/p6/t42f8nmd7332018zm9m2s3d80000gn/T/d20180415-42656-1hjxh43 --template= --single-branch --depth 1 --branch v0.6.0
Cloning into '/var/folders/p6/t42f8nmd7332018zm9m2s3d80000gn/T/d20180415-42656-1hjxh43'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
查看mac中cocoapods 本地库路径:
swaedeMacBook-Pro:alpface swae$ pod repo
- Type: git (master)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/swae/.cocoapods/repos/master
在本地库中, 并找到对应的libwebp版本的文件
swaedeMacBook-Pro:alpface swae$ find /Users/你的用户名/.cocoapods/repos/master -iname libwebp
/Users/你的用户名/.cocoapods/repos/master/Specs/1/9/2/libwebp
进入libwebp目录,可以看到你的仓库中有哪些对应的版本
swaedeMacBook-Pro:libwebp swae$ cd /Users/你的用户名/.cocoapods/repos/master/Specs/1/9/2/libwebp
"source": {
"git": "https://chromium.googlesource.com/webm/libwebp",
"tag": "v0.6.0"
},
将其中的"git" 对应的url替换为https://github.com/webmproject/libwebp.git,并保存 最后再执行pod install, 完成