記錄一下重裝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
.
安裝ruby踩的坑
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
推薦閱讀更多精彩內容
- 1.移除現有的Ruby $gem sources --remove https://rubygems.org/ 2...