HWWY

导航

Error installing libwebp

1、Error installing libwebp

  错误描述如下:

[!] Error installing libwebp

 

[!] /usr/local/bin/git clone https://chromium.googlesource.com/webm/libwebp /var/folders/9f/lkfpkvpn5j5cks24q8zgbmyc0000gn/T/d20190619-83200-lk5d3j --template= --single-branch --depth 1 --branch v1.0.2

 

Cloning into '/var/folders/9f/lkfpkvpn5j5cks24q8zgbmyc0000gn/T/d20190619-83200-lk5d3j'...

fatal: unable to access 'https://chromium.googlesource.com/webm/libwebp/': Failed to connect to chromium.googlesource.com port 443: Operation timed out

 

  解决方案:

1、查看MAC系统中Cocoapods本地库路径:

   执行pod repo命令:

   master

   - Type: git (master)

   - URL:  https://github.com/CocoaPods/Specs.git

   - Path: /Users/illscholar/.cocoapods/repos/master

 

2、在本地库中, 并找到对应的libwebp版本的文件

   find /Users/illscholar/.cocoapods/repos/master -iname libwebp

   /Users/illscholar/.cocoapods/repos/master/Specs/1/9/2/libwebp

 

3、进入libwebp目录,可以看到你的仓库中有哪些对应的版本

   cd /Users/illscholar/.cocoapods/repos/master/Specs/1/9/2/libwebp

 

4、执行ls命令查看

   total 0

   drwxr-xr-x  3 illscholar  staff  96  6 28  2018 0.4.1

   drwxr-xr-x  3 illscholar  staff  96  6 28  2018 0.4.2

   drwxr-xr-x  3 illscholar  staff  96  6 28  2018 0.4.3

   drwxr-xr-x  3 illscholar  staff  96  6 28  2018 0.4.4

   drwxr-xr-x  3 illscholar  staff  96  6 28  2018 0.5.0

   drwxr-xr-x  3 illscholar  staff  96  6 28  2018 0.5.1

   drwxr-xr-x  3 illscholar  staff  96  6 28  2018 0.5.2

   drwxr-xr-x  3 illscholar  staff  96  1  4 12:04 0.6.0

   drwxr-xr-x  3 illscholar  staff  96  4  9 12:42 0.6.1

   drwxr-xr-x  3 illscholar  staff  96 10  4  2018 1.0.0

   drwxr-xr-x  3 illscholar  staff  96  2 25 11:01 1.0.1

   drwxr-xr-x  3 illscholar  staff  96  6 19 20:23 1.0.2

6、由于SDWebImage 依赖的 libwebp版本为1.0.2,所以我们进入1.0.2中,并做修改

   cd 1.0.2

    

   vim libwebp.podspec.json

 

   找到

   "source": {

   "git": "https://chromium.googlesource.com/webm/libwebp",

   "tag": "v1.0.2"

   },

 

   将其中的"git"对应的值替换为https://github.com/webmproject/libwebp.git,并保存

7、再次执行

   pod install

posted on 2019-07-18 18:09  HWWY  阅读(906)  评论(0编辑  收藏  举报