redmine问题集锦02
2016-03-21 17:15
351 查看
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
2.
gem install mysql2
已经讲的很清楚了,安装mysql-devel
yum install mysql-devel
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 libraries
2.
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
相关文章推荐
- OpenSSL编程之RSA
- 怎样安装openssl 2011-12-11
- 红宝石(Ruby)史话
- Ruby简明教程之循环语句介绍
- ruby 一些简单的例子
- Ruby on Rails在Ping ++ 平台实现支付
- Ruby 之 class 中的 private、 protected、public
- Ruby中操作文件的方法介绍
- Ruby中的集合编写指南
- CentOS 6.3下编译安装Ruby 2.0笔记
- Ruby基本的环境变量设置以及常用解释器命令介绍
- Ruby编程中关于中断和返回的用法教程
- Ruby中的异常处理代码编写示例
- Ruby中的变量学习总结
- 几个加速Ruby on Rails的编程技巧
- Ruby配置rspec和RestClient来检测服务器
- 分析Cache 在 Ruby China 里面的应用情况
- Ruby中数组的一些相关使用方法
- 编写Ruby代码注释时需要注意的一些问题