Error installing libwebp

pod install报错

[!] Error installing libwebp
[!] /usr/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/8m/s1m07k7j34d84z93yw6lmj0m0000gp/T/d20200403-87380-8sxq3p --template= --single-branch --depth 1 --branch v1.0.2

Cloning into '/var/folders/8m/s1m07k7j34d84z93yw6lmj0m0000gp/T/d20200403-87380-8sxq3p'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out

https://chromium.googlesource.com/webm/libwebp 被墙
更换下载源 找到对应文件

 find ~/.cocoapods/repos/master -iname libwebp
/Users/you_mac_name/.cocoapods/repos/master/Specs/1/9/2/libwebp

修改libwebp.podspec.json文件:

"git": "https://chromium.googlesource.com/webm/libwebp"
为
"git": "https://github.com/webmproject/libwebp"

重新执行pod install --verbose --no-repo-update即可

cocoapod 1.8.+之后

默认为源为https://cdn.cocoapods.org/

执行pod install --verbose --no-repo-update

出现

-> Installing libwebp 1.0.2 (source changed to `https://cdn.cocoapods.org/` from `https://github.com/cocoapods/specs.git`)
 > Git download
 > Git download
     $ /usr/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/8m/s1m07k7j34d84z93yw6lmj0m0000gp/T/d20200403-87380-8sxq3p --template= --single-branch --depth 1
     --branch v1.0.2
     Cloning into '/var/folders/8m/s1m07k7j34d84z93yw6lmj0m0000gp/T/d20200403-87380-8sxq3p'...
     fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out

[!] Error installing libwebp
[!] /usr/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/8m/s1m07k7j34d84z93yw6lmj0m0000gp/T/d20200403-87380-8sxq3p --template= --single-branch --depth 1 --branch v1.0.2

Cloning into '/var/folders/8m/s1m07k7j34d84z93yw6lmj0m0000gp/T/d20200403-87380-8sxq3p'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out

此时同样的方法应该去 trunk中去修改

find ~/.cocoapods/repos/trunk -iname libwebp
/Users/yuehuig/.cocoapods/repos/trunk/Specs/1/9/2/libwebp

找到对应的文件
修改libwebp.podspec.json文件:

"git": "https://chromium.googlesource.com/webm/libwebp"
为
"git": "https://github.com/webmproject/libwebp"

重新执行pod install --verbose --no-repo-update即可

你可能感兴趣的:(Error installing libwebp)