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

相关内容

热门资讯

安全生产许可证状态不是“有效”... 工程公司的安全生产许可证在官方系统显示为“其他”状态,有一栏则显示“整改”,却成为高标准农田项目的第...
深化产教融合 推进数智育人 哈... 7月23日,由阿里国际人工智能人才孵化中心(以下简称“阿里国际AITIC”)主办的“智启未来·数智赋...
中国工程院举办学习陈立泉、贲德... 北京7月24日电 (记者 孙自法)中国工程院7月24日在北京举办学习陈立泉、贲德院士科学家精神座谈会...
从成都看低空经济,专访杨军:万... 电子科技大学教授、深思实验室主任杨军接受封面新闻记者专访 封面新闻记者 王一理 摄影 陈光旭 近年来...
蚂蚁集团副总裁张俊杰:希望与成... 7月24日下午,APEC人工智能高级别论坛在成都举行。会议期间,蚂蚁集团副总裁、健康事业群总裁张俊杰...
北大博雅塔为王虹邓煜亮灯 极目新闻记者 陈洋洋7月24日晚,多位北京网友发帖称,在北京大学校园内的博雅塔上,看到了庆祝中国数学...
要和马六甲争高下的陆桥黄了,暴... (文/观察者网 郭光昊、张菁娟)绕开马六甲海峡,在泰国南部的狭窄地峡上“劈开一个口子”。这是每个中国...
AI做科研,走过概念期 2024年,诺贝尔化学奖颁给了谷歌DeepMind的两位人工智能科学家德米斯·哈萨比斯和约翰·杰珀,...
FLUX 3多模态AI模型登场... IT之家 7 月 24 日消息,Black Forest Labs 昨日(7 月 23 日)发布博文...
广州远联取得带全方位保护结构的... 国家知识产权局信息显示,广州远联物流服务有限公司取得一项名为“一种带全方位保护结构的升降平台”的专利...