美文网首页
iOS pod libwebp错误解决方案

iOS pod libwebp错误解决方案

作者: 愤斗的小蚂蚁 | 来源:发表于2020-08-05 17:29 被阅读0次

1 pod libwebp 错误信息:

# 错误信息1
$ pod install
Analyzing dependencies
Pre-downloading: `SDWebImageWebPCoder` from `https://github.com/SDWebImage/SDWebImageWebPCoder.git`, branch `master`
Downloading dependencies
Installing Expecta (1.0.6)
Installing KVOController (1.2.0)
Installing SDWebImage (5.8.1)
Installing SDWebImageWebPCoder (0.6.1)
Installing libwebp (1.1.0)

[!] Error installing libwebp
[!] /usr/local/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/fw/pf69tfvj2kn1lgld209223k80000gn/T/d20200805-21604-1f57ke --template= --single-branch --depth 1 --branch v1.1.0

Cloning into '/var/folders/fw/pf69tfvj2kn1lgld209223k80000gn/T/d20200805-21604-1f57ke'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out

# 错误信息2
$ pod install
Analyzing dependencies
Downloading dependencies
Installing libwebp 1.1.0 (source changed to `https://cdn.cocoapods.org/` from `trunk`)

[!] Error installing libwebp
[!] /usr/local/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/fw/pf69tfvj2kn1lgld209223k80000gn/T/d20200805-24219-wvgiyn --template= --single-branch --depth 1 --branch v1.1.0

Cloning into '/var/folders/fw/pf69tfvj2kn1lgld209223k80000gn/T/d20200805-24219-wvgiyn'...
fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out

2 解决方案:

1、打开终端,pod repo 查看 cocoapods 在本机的PATH。注意本机可能存在多个空间,master,trunk,AliBCSpecs等。发现在master,trunk空间子目录都存在/Specs/1/9/2/libwebp。
2、拼接地址:将1所得出trunk空间path路径拼接为:path/Specs/1/9/2/libwebp。测试只替换trunk空间即可。
3、右键finder前往文件夹,将2所得地址输入,前往。
4、打开你要加载的版本相应的文件夹,如我的错误信息为Installing libwebp (1.1.0),则用文本编辑打开1.1.0文件夹的json文件。
5、将libwebp.podspec.json文件中source下git地址更改为https://github.com/webmproject/libwebp.git
6、重启终端(可选),重新pod即可。

mac-Air:SDWebImage mac$ pod repo

AliBCSpecs
- Type: git (master)
- URL:  http://repo.baichuan-ios.taobao.com/baichuanSDK/AliBCSpecs.git
- Path: /Users/mac/.cocoapods/repos/AliBCSpecs

master
- Type: git (master)
- URL:  https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
- Path: /Users/mac/.cocoapods/repos/master

trunk
- Type: CDN
- URL:  https://cdn.cocoapods.org/
- Path: /Users/mac/.cocoapods/repos/trunk

4 repos
$ 
$ pod install
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client projects
Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.
$ 
image.png
image.png

相关文章

网友评论

      本文标题:iOS pod libwebp错误解决方案

      本文链接:https://www.haomeiwen.com/subject/wmjorktx.html