redmine问题集锦02
admin
2023-02-15 22:00:05
0

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 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

相关内容

热门资讯

神龙拜耳光伏有限公司生产支架 光伏支架,到底“支”起了什么? 提到光伏电站,很多人第一反应是那一块块深蓝色的电池板。但真正让这些电...
食品级制冰袋厂家选型指南:上海... 导语:在餐饮、物流、医药等行业中,制冰袋作为低温保鲜的核心耗材,其性能稳定性直接影响产品品质与运营效...
南通崇川发放首笔“算力券”补贴 购买、领券、付款……近日,随着在南通市公共算力服务平台算力超市完成中国移动算力服务的租用下单操作,江...
百万上下文之后,拼什么? 文 | 科技不许冷 过去几天,科技圈的视线全被DeepSeek吸走了。 满屏都是传闻中的估值溢价,...
成语之都 好玩邯郸丨邯山区AI... (来源:邯郸新闻网) 转自:邯郸新闻网 近日,在邯山区科技创新产业园内的邯郸人工智能教育基地,一拨拨...
量子计算机联手超级计算机,创下... 5 月 5 日消息,量子计算机最具前景的应用方向之一是模拟蛋白质,助力人类研发新药,但目前这类设备误...
我国新一代人工智能技术加速落地... 2026 年 5 月 5 日,工信部、科技部、国家网信办联合发布《人工智能产业高质量发展行动计划(2...
老黄可能开始焦虑了 文 | 象先志 2026年4月15日,黄仁勋在Dwarkesh Patel 的播客里经历了一场他很...
俄外长与美国务卿通话,讨论双边... △鲁比奥(左)与拉夫罗夫(右)当地时间5月5日,据俄罗斯外交部消息,俄罗斯外长拉夫罗夫与美国国务卿鲁...
即使中东冲突今天停止,欧盟在未... 新华社布鲁塞尔5月5日电(记者康逸)欧盟能源委员丹·约根森5日警告说,由于伊朗战事以及霍尔木兹海峡遭...