错误信息如下:
Downloading dependencies
Installing libwebp 1.2.0
[!] Error installing libwebp
[!] /usr/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/v8/qlml9qjn4c9dx2lzyr1tlc0m0000gn/T/d20230817-1797-e93knv --template= --single-branch --depth 1 --branch v1.2.0
Cloning into '/var/folders/v8/qlml9qjn4c9dx2lzyr1tlc0m0000gn/T/d20230817-1797-e93knv'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443 after 75004 ms: Couldn't connect to server
解决办法:
1、pod repo 查看 cocoapods 在本机的PATH
2、拼接地址:由1所得出path拼接为,path/Specs/1/9/2/libwebp
3、右键finder前往文件夹,将2所得地址输入,前往
4、打开你要加载的版本相应的文件夹,如我的错误信息为Installing libwebp (1.2.0),则用文本编辑打开1.2.0文件夹的json文件
5、将json中source下git地址更改为https://github.com/webmproject/libwebp.git
也可以直接cd /Users/mac/.cocoapods/repos/master/Specs/1/9/2/libwebp
其中mac是你的电脑用户名,作参考
经过上面操作真的可以成功 ?
笔者体验了 却没有
看我的:
pod repo
mac$ pod repo
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin22/rbconfig.rb:21: warning: Insecure world writable dir /usr/local/opt in PATH, mode 040777
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring json-2.6.2 because its extensions are not built. Try: gem pristine json --version 2.6.2
aliyun-mpaas-public-podspecs
- Type: git (master)
- URL: https://code.aliyun.com/mpaas-public/podspecs.git
- Path: /Users/mac/.cocoapods/repos/aliyun-mpaas-public-podspecs
master
- Type: git (remotes/origin/master)
- URL: https://github.com/CocoaPods/Specs.git
- Path: /Users/mac/.cocoapods/repos/master
trunk
- Type: CDN
- URL: https://cdn.cocoapods.org/
- Path: /Users/mac/.cocoapods/repos/trunk
tsinghua-git-cocoapods
- Type: git (remotes/origin/master)
- URL: https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
- Path: /Users/mac/.cocoapods/repos/tsinghua-git-cocoapods
4 repos
有4个repos 不清楚用的那个话 只能一个个去操作,因为我用的可能不是master 下的
/Users/mac/.cocoapods/repos/master/Specs/1/9/2/libwebp
可能是:
/Users/mac/.cocoapods/repos/trunk/Specs/1/9/2/libwebp
/Users/mac/.cocoapods/repos/tsinghua-git-cocoapods/Specs/1/9/2/libwebp
需要每个操作下。最后 pod install 就好了
网友评论