1.查看mac中cocoapods 本地库路径:
pod repo
/Users/swae/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/cocoapods-1.4.0/lib/cocoapods/executable.rb:89: warning: Insecure world writable dir /opt in PATH, mode 040777
master
- Type: git (master)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/swae/.cocoapods/repos/master
2.在本地库中, 并找到对应的libwebp版本的文件
find /Users/swae/.cocoapods/repos/master -iname libwebp
3.进入libwebp目录,可以看到你的仓库中有哪些对应的版本
swaedeMacBook-Pro:libwebp swae ls -l
total 0
drwxr-xr-x 3 swae staff 96 12 3 21:50 0.4.1
drwxr-xr-x 3 swae staff 96 12 3 21:50 0.4.2
drwxr-xr-x 3 swae staff 96 12 3 21:50 0.4.3
drwxr-xr-x 3 swae staff 96 12 3 21:50 0.4.4
drwxr-xr-x 3 swae staff 96 12 3 21:50 0.5.0
drwxr-xr-x 3 swae staff 96 12 3 21:50 0.5.1
drwxr-xr-x 3 swae staff 96 12 3 21:50 0.5.2
drwxr-xr-x 3 swae staff 96 12 3 21:50 0.6.0
4.进入对应版本的libwebp文件夹,找到libwebp.podspec.json
"source": {
"git": "https://chromium.googlesource.com/webm/libwebp",
"tag": "v0.6.0"
},
将其中的"git" 对应的url替换为https://github.com/webmproject/libwebp.git,并保存 最后再执行pod install, 完成
网友评论