记录一下重装cocoapods遇到的坑,希望能帮助到读者朋友。
在运行rvm install 3.0.0
的时候,一直报错
The requested url does not exist(22): 'https://www.mirrorservice.org/sites/rvm_io.global.ssl.fastly.net/binaries/osx/11.0/x86_64/ruby-3.0.0.tar.bz2?rvm=1.29.12' Failed download Downloading https://rvm_io.global.ssl.fastly.net/binaries/osx/11.0/x86_64/ruby-3.0.0.tar.bz2 failed.
和
The requested url does not exist(22): 'https://rvm_io.global.ssl.fastly.net/binaries/osx/11.0/x86_64/ruby-3.0.0.tar.bz2?rvm=1.29.12'
以及
Error running '__rvm_make -j12', please read /Users/rameshveeriaperumal/.rvm/log/1594563457_ruby-3.0.0/make.log
提示连接找不到。后来采用的办法是先安装之前版本rvm install 2.5.8
,直接安装畅通无阻,后续安装2.7.2
也是很顺利,唯独在3.0.0时遇到了点麻烦,错误如下:
Error running ' CFLAGS=-O3 -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl@1.1/include LDFLAGS=-L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl@1.1/lib ./configure --prefix=/Users/name/.rvm/rubies/ruby-3.0.0 --disable-install-doc --enable-shared', please read /Users/name/.rvm/log/1615658870_ruby-3.0.0/configure.log There has been an error while running configure. Halting the installation.
打开这个文件configure.log
提示如下
_rvm_log_dotted:23: permission denied:
输入rvm install ruby-3.0.0 --with-openssl-dir='brew --prefix openssl'
。回车,安装顺利。
输入rvm list
,可以查看本地已经安装过的ruby版本,有正在使用的版本、默认版本和正在使用且为默认的版本三个选项。
输入rvm use 3.0.0
,将3.0.0
切换current
版本,
输入rvm rvm --default use 3.0.0
,将3.0.0
版本设置为默认且正在使用的版本。
更多操作可以google或者rvm help
.
网友评论