用 Carthage
打包 framework 时候依赖一直拉不下来, 报如下错误:
less
*** Fetching fmdb
*** Cloning sqlcipher
A shell task (/usr/bin/env git clone --bare --quiet https://github.com/sqlcipher/sqlcipher.git /Users/ruris/Library/Caches/org.carthage.CarthageKit/dependencies/sqlcipher) failed with exit code 128:
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 6334 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
最快的解决办法就是去 Github
自己把源码拉下来放进缓存目录去.
第一步
进入 Carthage
缓存目录:
javascript
~/Library/Caches/org.carthage.CarthageKit
执行命令:
css
carthage update --platform iOS --configuration Release
实际上是打包命令, 后面参数可以改.
Clone
开始就会出现缓存库的目录 sqlcipher
文件夹, 目录下内容如下:
第二步
把以上内容复制替换到从 Github
下载的目录中.
直接把仓库代码放进去是不行的, 还是会从新
Clone
.
然后把库的目录放在缓存目录下即可.
再执行 carthage update
命令, 之前的 clone
就变成 fetching
了.
csharp
*** Fetching sqlcipher
*** Fetching fmdb
*** Checking out sqlcipher at "v4.6.1"
*** Checking out fmdb at "2.7.12"
# 以下省略若干 log