pod 接入libwebp报错

pod 'SDWebImage'
pod 'SDWebImageWebPCoder'

pod install

Installing SDWebImage (5.7.4)
Installing SDWebImageWebPCoder (0.6.1)
Installing libwebp (1.1.0)

[!] Error installing libwebp
[!] /usr/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/hq/b1tbnd911hn_f087h1jqvh1r0000gp/T/d20200521-3058-e029p4 --template= --single-branch --depth 1 --branch v1.1.0

Cloning into '/var/folders/hq/b1tbnd911hn_f087h1jqvh1r0000gp/T/d20200521-3058-e029p4'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Could not resolve host: chromium.googlesource.com

没有翻墙无法访问https://chromium.googlesource.com/webm/libwebp

解决方法:

open .cocoapods/repos

1.打开libwebp文件夹
如果使用master则选择master->Specs->1->9->2->libwebp
如果使用trunk则选择trunk->Specs->1->9->2->libwebp
2.选择相应的版本文件,修改libwebp.podspec.json文件里面的source的git地址为https://github.com/webmproject/libwebp.git

0FE8E82A-07B6-4BB6-BD06-E3D206E72CC0.png

7487288A-59B6-4730-BF3C-4D58371F3E5D.png

然后继续pod install就可以了。

你可能感兴趣的:(pod 接入libwebp报错)