From: https://blog.csdn.net/songbai1211/article/details/108780438
Error installing libwebp
Cloning into '/var/folders/99/kyqkb4x92vv7qr1d3cvht20m0000gn/T/d20200924-21049-l5t8tn'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
报错
尝试过翻墙无效,后来修改pod repo中libwebp的git source 地址,再执行pod install 解决。
解决流程
- 查看
Mac
中cocoapods
本地库路径:pod repo
➜ LDUser git:(dev) pod repo
trunk
- Type: CDN
- URL: https://cdn.cocoapods.org/
- Path: /Users/log/.cocoapods/repos/trunk
- 在
Path
中找到libwebp
对应的文件夹:find /Users/log/.cocoapods/repos/master -iname libwebp
➜ LDUser git:(dev) find /Users/log/.cocoapods/repos/trunk -iname libwebp
/Users/log/.cocoapods/repos/trunk/Specs/1/9/2/libwebp
进入libwebp
目录,查看有哪些版本
.cocoapods /Users/log/.cocoapods/repos/trunk/Specs/1/9/2/libwebp
➜ libwebp ls -l
total 0
drwxr-xr-x 4 log staff 128 9 24 17:03 0.4.1
{
drwxr-xr-x 4 log staff 128 9 24 17:03 0.4.2
drwxr-xr-x 4 log staff 128 9 24 17:03 0.4.3
drwxr-xr-x 4 log staff 128 9 24 17:03 0.4.4
drwxr-xr-x 4 log staff 128 9 24 17:03 0.5.0
drwxr-xr-x 4 log staff 128 9 24 17:03 0.5.1
drwxr-xr-x 4 log staff 128 9 24 17:03 0.5.2
drwxr-xr-x 4 log staff 128 9 24 17:03 0.6.0
{
drwxr-xr-x 4 log staff 128 9 24 17:03 0.6.1
drwxr-xr-x 4 log staff 128 9 24 17:03 1.0.0
drwxr-xr-x 4 log staff 128 9 24 17:03 1.0.1
drwxr-xr-x 4 log staff 128 9 24 17:03 1.0.2
drwxr-xr-x 4 log staff 128 9 24 17:03 1.0.3
drwxr-xr-x 4 log staff 128 9 24 17:03 1.1.0
drwxr-xr-x 4 log staff 128 9 24 17:03 1.1.0-rc2
在1.0.0
目录下的libwebp.podspec.json
文件中修改git source
Mac-mini:libwebp ammk$ cd 1.0.0
Mac-mini:1.0.0 ammk$ ls -l
total 8
-rw-r--r-- 1 ammk staff 1694 10 30 11:17 libwebp.podspec.json
Mac-mini:1.0.0 ammk$ sudo vim libwebp.podspec.json
将其中homepage
改为https://github.com/webmproject/
,
source->git
改为https://github.com/webmproject/libwebp.git
"name": "libwebp",
"version": "1.0.0",
"summary": "Library to encode and decode images in WebP format.",
"homepage": "https://developers.google.com/speed/webp/",
"authors": "Google Inc.",
"license": {
"type": "BSD",
"file": "COPYING"
},
"source": {
"git": "https://chromium.googlesource.com/webm/libwebp",
"tag": "v1.0.0"
},
再cd
到原程序文件下,重新pod install
。