gpt4 book ai didi

ruby-on-rails - libruby.so.1.8 : cannot open shared object file: No such file or directory

转载 作者:行者123 更新时间:2023-12-03 23:32:28 24 4
gpt4 key购买 nike

启动项目服务器时出现以下错误。我从昨天开始就试图解决,但无法解决。有人请帮助我。

=> Booting WEBrick
=> Rails 2.3.14 application starting on http://0.0.0.0:3001
Encountered error loading /home/success/prj/myprj/vendor/gems/mysql2-0.2.18/precompiled/i686-linux/1.8.7/mysql2/mysql2.so: libruby.so.1.8: cannot open shared object file: No such file or directory - /home/success/prj/myprj/vendor/gems/mysql2-0.2.18/precompiled/i686-linux/1.8.7/mysql2/mysql2.so
Encountered error loading /home/success/prj/myprj/vendor/gems/mysql2-0.2.18/precompiled/i686-linux/1.8.7/mysql2/mysql2.so: libruby.so.1.8: cannot open shared object file: No such file or directory - /home/success/prj/myprj/vendor/gems/mysql2-0.2.18/precompiled/i686-linux/1.8.7/mysql2/mysql2.so
/home/success/prj/eschool/vendor/gems/mysql2-0.2.18/lib/mysql2/mysql2.rb:13: Failed to load mysql2 binary for your platform (i686-linux/1.8.7) Run ./compile_native_library.rb (RuntimeError)
from /home/success/prj/myprj/vendor/gems/rubygems-update-1.7.2/lib/rubygems/custom_require.rb:36:in `gem_original_require'
from /home/success/prj/myprj/vendor/gems/rubygems-update-1.7.2/lib/rubygems/custom_require.rb:36:in `require'
from /home/success/prj/myprj/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require'
from /home/success/prj/myprj/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in `new_constants_in'
from /home/success/prj/myprj/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require'
from /home/success/prj/myprj/vendor/gems/mysql2-0.2.18/lib/mysql2.rb:9

更新:
success@success-Vostro-1400:/usr/lib$ ls -l libruby*
lrwxrwxrwx 1 root root 19 2012-02-22 07:07 libruby1.8.so -> libruby1.8.so.1.8.7
lrwxrwxrwx 1 root root 19 2012-02-22 07:07 libruby1.8.so.1.8 -> libruby1.8.so.1.8.7
-rw-r--r-- 1 root root 956360 2012-02-22 07:22 libruby1.8.so.1.8.7
-rw-r--r-- 1 root root 1436438 2012-02-22 07:22 libruby1.8-static.a

最佳答案

我按照以下步骤解决了这个问题:

  • 卸载所有 mysql2 gems
  • 安装 mysql2 , 版本 < 0.3
  • 转至 vendor/gems目录
  • 执行 gem unpack mysql2
  • 执行 rake gems:refresh_specs
  • 执行 rake gems:build
  • 添加 config.gem mysql2environment.rb
  • 重启服务器
  • 关于ruby-on-rails - libruby.so.1.8 : cannot open shared object file: No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9561708/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com