我在我的虚拟机ubuntu12.04lts中安装了openssl.
当我运行gem命令时,它会出错.
错误:执行gem时(Gem :: Exception)
无法使用openssl.安装openSSL并重建ruby(首选)或使用非HTTPs源
我还测试了irb模式下的openssl.它给出了错误.
Loaderror:无法
从/usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55"require" 加载此类文件--openssl
我有openssl
$openssl version
OpenSSL 1.0.1 14 mar 2012
Run Code Online (Sandbox Code Playgroud)
如何修复错误?
我试图使用安装最新的稳定 Ruby 版本(3.1.x,3.2.x)rvm。但是,rvm install编译 Ruby 时,任何这些版本的命令都会失败。例如,当尝试运行时
rvm install 3.1.4
Run Code Online (Sandbox Code Playgroud)
我得到以下输出:
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/13.5/arm64/ruby-3.1.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Updating certificates bundle '/opt/homebrew/etc/openssl@1.1/cert.pem'
Requirements installation successful.
Installing Ruby from source to: /Users/davidlj95/.rvm/rubies/ruby-3.1.4, this may take a while depending on your cpu(s)...
ruby-3.1.4 - #downloading ruby-3.1.4, this may …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 RubyGems 在我的 Mac ( ) 上安装 Jekyll gem install jekyll,但遇到了以下错误。
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /Users/nikhilanand/.rvm/gems/ruby-3.0.2/gems/eventmachine-1.2.7/ext
/Users/nikhilanand/.rvm/rubies/ruby-3.0.2/bin/ruby -I /Users/nikhilanand/.rvm/rubies/ruby-3.0.2/lib/ruby/3.0.0 -r ./siteconf20210816-54247-5zijii.rb extconf.rb
checking for -lcrypto... yes
checking for -lssl... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_fd_select()... yes
checking for rb_fdset_t in …Run Code Online (Sandbox Code Playgroud)