編譯的 Ruby 2.3.0 缺少 openssl 支持的解決方法 (已解決)
阿新 • • 發佈:2017-12-27
gpo 重新 and 技術 body figure 編譯 class failed
我的系統是centos 7.5,已離線安裝ruby-2.3.0,openssl-1.0.2l,rubygems-2.7.4 如下圖:
但是在 gem sources -a http://gems.ruby-china.org/ 時報錯 Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
重新編譯發現, make的輸出中有 configuring openssl Failed to configure openssl. It will not be installed. 如上字樣。
然後重新配置, 在運行configure時加上了openssl路徑信息即可。 正確編譯的姿勢如下:
# cd /app/ruby-2.3.0
# ./configure --with-openssl-dir=/app/openssl-1.0.2l/ssl
# make
# sudo make install
再次執行 gem sources -a http://gems.ruby-china.org/ ,雖然上面的錯沒有了,又報錯
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::RemoteFetcher::Zlib
編譯的 Ruby 2.3.0 缺少 openssl 支持的解決方法 (已解決)