rvm安装ruby版本问题排查
(base) ✘ cookiywang@Coruscant ~ rvm install 2.6.1
Warning, new version of rvm available '1.29.12-next', you are using older version '1.27.0'.
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
ruby-2.6.1 - #removing src/ruby-2.6.1 - please wait
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/12.2/x86_64/ruby-2.6.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system - please wait
Installing required packages: openssl - please wait
Certificates in '/usr/local/etc/openssl@3/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/cookiywang/.rvm/rubies/ruby-2.6.1, this may take a while depending on your cpu(s)...
ruby-2.6.1 - #downloading ruby-2.6.1, this may take a while depending on your connection...
ruby-2.6.1 - #extracting ruby-2.6.1 to /Users/cookiywang/.rvm/src/ruby-2.6.1 - please wait
ruby-2.6.1 - #configuring - please wait
ruby-2.6.1 - #post-configuration - please wait
ruby-2.6.1 - #compiling - please wait
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/cookiywang/.rvm/log/1645519864_ruby-2.6.1/make.log
^
/usr/local/opt/openssl@3/include/openssl/err.h:412:1: note: 'ERR_get_error_line_data' has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0
^
/usr/local/opt/openssl@3/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
^
/usr/local/opt/openssl@3/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
^
1 error generated.
make[2]: *** [ossl.o] Error 1
make[1]: *** [ext/openssl/all] Error 2
make: *** [build-ext] Error 2
+__rvm_make:0> return 2
There has been an error while running make. Halting the installation.
The issue might be that you've got several Openssl versions installed
You can check it with
ls -la /usr/local/opt/ | grep openssl
servel Openssl versions installed in mac
lrwxr-xr-x 1 cookiywang staff 28 Feb 21 11:18 openssl@1.1 -> ../Cellar/openssl@1.1/1.1.1m
lrwxr-xr-x 1 cookiywang staff 25 Feb 21 17:25 openssl@3 -> ../Cellar/openssl@3/3.0.1
19 export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
5 " 这里根据自己需要的插件来设置,以下是我的配置 "
6 " YouCompleteMe:语句补全插件"
7 set runtimepath+=~/.vim/bundle/YouCompleteMe
8 autocmd InsertLeave * if pumvisible() == 0|pclose|endif "离开插入模式后自动关闭预览窗口"
9 let g:ycm_collect_identifiers_from_tags_files = 1 "开启 YCM基于标签引擎"
10 let g:ycm_collect_identifiers_from_comments_and_strings = 1 "注释与字符串中的内容也用于补全"
11 let g:syntastic_ignore_files=[".*.py$"]
12 let g:ycm_seed_identifiers_with_syntax = 1 "语法关键字补全"
13 let g:ycm_complete_in_comments = 1
14 let g:ycm_confirm_extra_conf = 0 "关闭加载.ycm_extra_conf.py提示"
15 let g:ycm_key_list_select_completion = ['
16 let g:ycm_complete_in_comments = 1 "在注释输入中也能补全"
17 let g:ycm_complete_in_strings = 1 "在字符串输入中也能补全"
18 let g:ycm_collect_identifiers_from_comments_and_strings = 1 "注释和字符串中的文字也会被收入补全"
19 let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
20 let g:ycm_show_diagnostics_ui = 0 "禁用语法检查"
21 inoremap
22 nnoremap
23 let g:ycm_min_num_of_chars_for_completion=2 "从第2个键入字符就开始罗列匹配项"
你可以用vim打开一个文件,在文件里执行:source ~/.vimrc,原因是vim有自己的执行环境,和终端的的执行环境是不一样的
source ~/.vimrc 成功了
call plug#begin('~/.vim/plugged')
6 Plug 'Valloric/YouCompleteMe' " 要安装的插件写在两个call之间
7 call plug#end()
8 " YouCompleteMe:语句补全插件"
9 set runtimepath+=~/.vim/plugged/YouCompleteMe
10 autocmd InsertLeave * if pumvisible() == 0|pclose|endif
11 let g:ycm_collect_identifiers_from_tags_files = 1
12 let g:ycm_collect_identifiers_from_comments_and_strings = 1
13 let g:syntastic_ignore_files=[".*.py$"]
14 let g:ycm_seed_identifiers_with_syntax = 1
15 let g:ycm_complete_in_comments = 1
16 let g:ycm_confirm_extra_conf = 0
17 let g:ycm_key_list_select_completion = ['
18 let g:ycm_complete_in_comments = 1
19 let g:ycm_complete_in_strings = 1
20 let g:ycm_collect_identifiers_from_comments_and_strings = 1
21 let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
22 let g:ycm_show_diagnostics_ui = 0
23 inoremap
24 nnoremap
25 let g:ycm_min_num_of_chars_for_completion=2