从昨天起,试着安装SUSE(SLES),并配置ROR环境,问题不断,今天更是遇到超郁闷的问题。
安装完了Ruby、GEM、Rails后,运行ruby script/server后,出现了个错。
引用
/usr/local/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:...:in `require_frameworks': no such file to load -- openssl (RuntimeError)
查了半天也没找出原因,发现SUSE中openssl已经安装了。找来找去,找到Ruby的源码文件夹中,有ext/openssl文件夹,然后再找到安装后的ruby文件夹下,发现根本就找不到openssl文件夹。
于是cd到ruby源码文件夹的ext/openssl文件下,执行“ruby exconf.rb”,出现了错误。
引用
=== OpenSSL for Ruby configurator ===
=== Checking for system dependent stuff... ===
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for assert.h... yes
=== Checking for required stuff... ===
checking for openssl/ssl.h... no
=== Checking for required stuff failed. ===
Makefile wasn't created. Fix the errors above.
搜索了整个系统也没找到ssl.h,几次要放弃源码安装ruby了。
最后抱着试试看的心态,通过google在suse网站找到了下面的网址:
http://www.novell.com/products/linuxpackages/enterpriseserver/i386/openssl-devel.html
从这个网址上,找到了下面的网址:
http://www.openssl.org/
犹豫着去下载了:openssl-0.9.8k.tar.gz。
解压后,执行make && make install,漫长的等待。。。。
终于安好了。在安装后的文件下搜ssl.h,发现这个文件存在了,看到点希望了。
回到ruby源文件文件夹的/ext/openssl文件夹下,执行“ruby exconf.rb”,错误依然。
获取ssl.h所在的文件夹之后,执行以下命令:
引用
ruby extconf.rb --with-openssl-include=/usr/local/ssl/include/
出现了新的错误:
引用
=== OpenSSL for Ruby configurator ===
=== Checking for system dependent stuff... ===
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for assert.h... yes
=== Checking for required stuff... ===
checking for openssl/ssl.h... yes
checking for OpenSSL_add_all_digests() in -lcrypto... no
checking for OpenSSL_add_all_digests() in -llibeay32... no
=== Checking for required stuff failed. ===
Makefile wasn't created. Fix the errors above.
非常有戏啊,再试一个命令:
引用
ruby extconf.rb --with-openssl-include=/usr/local/ssl/include/ --with-openssl-lib=/usr/local/ssl/lib
太神奇了,居然成功生成了Makefile,毫不犹豫,继续:
引用
make && make install
成功的安装了openssl到ruby的安装文件夹中。
最后,回到测试工程中,ruby script/server一下,哈哈,WEBrick成功启动,到FF下访问一下,完全OK了。
再试试lighttpd+fcgi,也是完全OK的,心情大好。
完。
分享到:
相关推荐
前言本博客所写到的是我在Linux云服务器升级编译内核时所遇到的真实问题,已解决。编译内核遇到的问题太多了。问题描述 在进行内核编译的时候,提sha1加密 C语
openldap-2.2.29-db-4.3.29-openssl 不为积分只为没有积分的哥们少作难,另有陪有强大的LdapAdmin.exe, 比较Softerra LDAP Browser 2.5强百倍。...openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe
apache_2.2.8-win32-x86-openssl-0.9.8g.msi安装方便快捷
httpd-2.2.25-win32-x86-openssl-0.9.8y.msi
openldap-2.2.29 windows安装包(免密钥),openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe
apache + svn 服务器搭建 包含apache安装包,和svn安装包 apache_2.2.11-win32-x86-openssl-0.9.8i.msi svn-win32-1.5.4
Apachehttpd-2.2.17-win32-x86-openssl
httpd-2.2.25-win32-x86-openssl-0.9.8y安装教程
tomcat-native-1.2.26-openssl-1.1.1i-win32-bin
apache_2.0.63-win32-x86-openssl-0.9.7m
apache_2.2.11-win32-x86-openssl-0.9.8i.zip
Laravel开发-laravel-openssl-encryption-42 使用php openssl扩展名的laravel 4加密包
httpd-2.2.22-win32-x86-openssl-0.9.8t.z
方便使用,易于学习,能在短时间内学习,不许花费太多时间
apache_-win32-x86-openssl 安装包
httpd-2.0.65-win32-x86-openssl-0.9.8y.msi
通过源码安装Ruby 2.7.0版本时报错,内容:ruby-2.7.0/lib/rubygems/core_ext/kernel_require.rb:92:in 'require': cannot load such file -- openssl (LoadError) 处理过程 前情提要:最近打算把自己的技术总结...
apache_2.2.8-win32-x86-openssl-0.9.8g,和SVN1.4.6,客户端1.4.8一起使用的。
Apache服务器msi版的安装 apache_2.4.23-x64-openssl-1.0.2hapache_2.4.23-x64-openssl-1.0.2hapache_2.4.23-x64-openssl-1.0.2hapache_2.4.23-x64-openssl-1.0.2h