将Ruby链接到加密库

时间:2012-05-11 18:32:46

标签: ruby linux

ruby -e 'require "digest/md5"'

引发错误:

<internal:lib/rubygems/custom_require>:29:in `require': libcrypto.so.0.9.8: cannot open shared object file: No such file or directory - /opt/local/lib/ruby/1.9.1/armv5tel-linux-eabi/digest/md5.so (LoadError)
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from -e:1:in `<main>'

知道如何将Ruby链接到加密库吗?

尝试在QNAP NAS服务器上运行Ruby on Rails。

操作系统是ARM Linux。

修改

尝试使用

建立与图书馆的链接
export LD_LIBRARY_PATH=/share/MD0_DATA/.qpkg/Optware/local/lib/ruby/1.9.1/armv5tel-linux-eabi/digest:$LD_LIBRARY_PATH
export RUBYLIB=/share/MD0_DATA/.qpkg/Optware/local/lib/ruby/1.9.1/armv5tel-linux-eabi/digest:$RUBYLIB

但我不知道我是否做得对。

解决

ln -s /share/MD0_DATA/.qpkg/Optware/lib/libcrypto.so.0.9.8 /lib/libcrypto.so.0.9.8

做了这个伎俩。

1 个答案:

答案 0 :(得分:0)

按照运行rvm requirements提供的说明解决了这个问题。