install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources 和uninitialized constant Gem:
2017-06-03 12:38
926 查看
centeros7 下安装ruby2.4.1 和rubygem2.6.12 在使用gem sources -a https://ruby.taobao.org/ 命令时遇到
问题1:Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
问题2:uninitialized constant Gem::RemoteFetcher::Zlib
经查询 问题1是没有安装openssl 问题2 没有安装zlib
解决方案:
1、先安装openssl 并使用 whereis 命令查看安装位置 (”/usr/local/openssl”)
2、安装zlib 使用 whereis 命令查看安装位置 (”/usr/local/zlib”)
cd /usr/src/ruby-2.4.1/ext/zlib
ruby extconf.rb –with-zlib-dir =/usr/local/zlib
make
make install
重点是要添加参数 –with****
问题1:Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
问题2:uninitialized constant Gem::RemoteFetcher::Zlib
经查询 问题1是没有安装openssl 问题2 没有安装zlib
解决方案:
1、先安装openssl 并使用 whereis 命令查看安装位置 (”/usr/local/openssl”)
cd /usr/src/ruby-2.4.1/ext/openssl ruby extconf.rb --with-openssl-include=/usr/local/openssl/include/ --with-openssl-lib=/usr/local/openssl/lib make make install
2、安装zlib 使用 whereis 命令查看安装位置 (”/usr/local/zlib”)
cd /usr/src/ruby-2.4.1/ext/zlib
ruby extconf.rb –with-zlib-dir =/usr/local/zlib
make
make install
重点是要添加参数 –with****
相关文章推荐
- Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources解决
- Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
- linux gem install mongo Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or u
- Unable to require openssl, install OpenSSL and rebuild ruby … on Ubuntu 14 LTS(ruby2.3.0 on ubuntu)
- 解决方法:配置群集时# gem install redis 报错:Unable to require openssl, install OpenSSL and rebuild ruby (prefer
- 解决方法:配置群集时# gem install redis 报错:Unable to require openssl, install OpenSSL and rebuild ruby (prefer
- Install and use CentOS 7 or RHEL 7 as KVM virtualization host
- Use the PDFs below or the HTML contents to the left to install and configure P6 EPPM and its additional components.
- Qt build submodules and install on Linux or Darwin
- Why I can't use non-string key in the myMap[myKey] expression? And what to do now?
- install ruby and ruby gem
- Pod install 过程中遇到- Use the `$(inherited)` flag, or - Remove the build settings from the target.
- button's UseSubmitBehavior="true" and RichText control (TelerikEditor or DevExpress Editor)
- You must use the Role Management Tool to install or configure Microsoft .NET Framework 3.5
- This function has none of Deterministic,no sql,or reads sql data in its declaration and binary logging is enabled(you *might* want to use the less safe log_bin_trust_function_creators variable
- [导入]Produce GIF or PNG barcode images from a Ruby on Rails application using RMagick and Gbarcode
- jsbin-jsfiddle-or-codepen-which-one-to-use-and-why
- spring.data.jpa.query :Cannot use native queries with dynamic sorting and/or pagination in method
- Trying to use an SPWeb object that has been closed or disposed and is no longer valid.