1. ossl_pkey_ec.c: In function ‘ossl_ec_group_initialize’: ossl_pkey_ec.c:761: warning: implicit declaration of function ‘EC_GF2m_simple_method’ ossl_pkey_ec.c:761: warning: assignment makes pointer from integer without a cast ossl_pkey_ec.c:816: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function) ossl_pkey_ec.c:816: error: (Each undeclared identifier is reported only once ossl_pkey_ec.c:816: error: for each function it appears in.) make[2]: *** [ossl_pkey_ec.o] Error 1 make[2]: Leaving directory `/root/ruby-1.9.3-p194/ext/openssl' make[1]: *** [ext/openssl/all] Error 2 make[1]: Leaving directory `/root/ruby-1.9.3-p194' make: *** [build-ext] Error 2 [root@mysql ruby-1.9.3-p194]#
问题原因:
由于redhat新版本默认openssl的配置变更取消了对EC_xx的支持,所以出现该错误。
解决方法:
该问题在ruby网站上已经提交并有了补丁。
参见链接:https://bugs.ruby-lang.org/issues/8384
即修改ext/openssl/ossl_pkey_ec.c代码如下:
gem install安装慢的解决方法:
移除gem 自带的源,默认是
http://rubygems.org/
[root@mysql ~]# gem sources --remove http://rubygems.org/ http://rubygems.org/ removed from sources
2.加入taobao的源
[root@mysql ~]# gem sources --add https://ruby.taobao.org/ https://ruby.taobao.org/ added to sources [root@mysql ~]# gem source -l *** CURRENT SOURCES *** https://ruby.taobao.org/
3.gem安装rail,看速度是否上升
[root@mysql ~]# gem install rail Fetching: rack-1.6.4.gem (100%) Fetching: coffee-script-source-1.10.0.gem (100%) Fetching: execjs-2.6.0.gem (100%) Fetching: coffee-script-2.4.1.gem (100%) Fetching: tilt-2.0.2.gem (100%) Fetching: haml-4.0.7.gem (100%) HEADS UP! Haml 4.0 has many improvements, but also has changes that may break your application: * Support for Ruby 1.8.6 dropped * Support for Rails 2 dropped * Sass filter now always outputs <style> tags * Data attributes are now hyphenated, not underscored * html2haml utility moved to the html2haml gem * Textile and Maruku filters moved to the haml-contrib gem For more info see: http://rubydoc.info/github/haml/haml/file/CHANGELOG.md Fetching: sass-3.4.21.gem (100%) Fetching: json-1.8.3.gem (100%) Building native extensions. This could take a while... Fetching: uglifier-2.7.2.gem (100%) Fetching: rail-0.0.8.gem (100%) Successfully installed rack-1.6.4 Successfully installed coffee-script-source-1.10.0 Successfully installed execjs-2.6.0 Successfully installed coffee-script-2.4.1 Successfully installed tilt-2.0.2 Successfully installed haml-4.0.7 Successfully installed sass-3.4.21 Successfully installed json-1.8.3 Successfully installed uglifier-2.7.2 Successfully installed rail-0.0.8 10 gems installed Installing ri documentation for rack-1.6.4... Installing ri documentation for coffee-script-source-1.10.0... Installing ri documentation for execjs-2.6.0... Installing ri documentation for coffee-script-2.4.1... Installing ri documentation for tilt-2.0.2... Installing ri documentation for haml-4.0.7... Installing ri documentation for sass-3.4.21... Installing ri documentation for json-1.8.3...
修改Gemfile才能顺利安装bundle install --without development test rmagickpostgresql sqli
[root@mysql redmine-2.5.3]# ls
app config.ru db extra Gemfile log public README.rdoc test vendor config CONTRIBUTING.md doc files lib plugins Rakefile script tmp [root@mysql redmine-2.5.3]# vi Gemfile
4.
gem install 时报错,no such file to load -- zlib
通过gem 安装mysql库时,报告 #gem install mysql ERROR: Loading command: install (LoadError) no such file to load -- zlib ERROR: While executing gem ... (NameError) uninitialized constant Gem::Commands::InstallCommand 解决办法是: 进入ruby源码文件夹 安装ruby自身提供的zlib包 #cd ext/zlib #ruby ./extconf.rb #make #make install