扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
1.ERROR: While executing gem ... (Gem::Exception) Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
在涟水等地区,都构建了全面的区域性战略布局,加强发展的系统性、市场前瞻性、产品创新能力,以专注、极致的服务理念,为客户提供成都网站制作、做网站、外贸营销网站建设 网站设计制作按需求定制网站,公司网站建设,企业网站建设,成都品牌网站建设,营销型网站,外贸网站制作,涟水网站建设费用合理。方法:
进入ruby源码解压包,进入ruby 源码包下的 ext/openssl ,用ruby自带的openssl编译,而不是yum 的openssl
cd /root/ruby-2.1.5/ext/openssl ruby extconf.rb 成功... make 报错.... make: *** No rule to make target `/thread_native.h', needed by `ossl.o'. Stop. 解决方法: 打开Makefile vim Makefile 加入第三行路径,也就是【top_srcdir = /root/ruby-2.1.5】 srcdir = . topdir = /usr/local/ruby/include/ruby-2.1.0 top_srcdir = /root/ruby-2.1.5 hdrdir = $(topdir) 保存退出,make clean, 重新make,成功, make install 成功 [root@mysql openssl]# make linking shared-object openssl.so [root@mysql openssl]# make install /usr/bin/install -c -m 0755 openssl.so /usr/local/ruby/lib/ruby/site_ruby/2.1.0/x86_64-linux installing default openssl libraries2.
gem install mysql2
Fetching: mysql2-0.4.3.gem (100%) Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /usr/local/ruby/bin/ruby -r ./siteconf20160321-3049-192s9jh.rb extconf.rb checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes checking for rb_intern3()... yes checking for mysql_query() in -lmysqlclient... no ----- mysql client is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install mysql-devel', and try again. ----- *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/ruby/bin/ruby --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib已经讲的很清楚了,安装mysql-devel
yum install mysql-devel
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流