$ gem -v
$ gem update --system
可能会报错:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Users/xxx/.rbenv/versions/x.x.1/lib/ruby/gems/x.x.0/plugins directory.
这是因为没权限,命令改成:
$ sudo gem update --system
看到这句就说明更新成功了:
RubyGems system software updated
再次输入$ gem -v
发现已经成功升级了
再次执行$ pod install
还是一样的报错,
抓狂 ...........>(>_<)<
查看pod版本号 gem source -l
升级 pod --version
再次执行$ pod install
还是失败 ...........>(>_<)<
仔细阅读了报错的信息,有一句话是:you can update with pod repo update
。
那就执行$ pod repo update
但是。。。
[!] Error installing AFNetworking
[!] /usr/bin/git clone https://github.com/AFNetworking/AFNetworking.git /var/folders/k2/vrc79n8d0nl_v5l5nyj3jl0r0000gn/T/d20210625-39910-v4xx94 --template= --single-branch --depth 1 --branch 4.0.1
Cloning into '/var/folders/k2/vrc79n8d0nl_v5l5nyj3jl0r0000gn/T/d20210625-39910-v4xx94'...
fatal: unable to access 'https://github.com/AFNetworking/AFNetworking.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
继续执行pod update
大功告成!!