LoadError:libncursesw.so.5:无法打开共享对象文件:没有这样的文件或目录

时间:2015-10-03 18:50:29

标签: ruby-on-rails ruby postgresql rake

我使用 Ruby 2.2.2 Rails 4.2 当我尝试运行任何rake任务时,我有这个错误消息 这是为什么?我该怎么办?

  • Ruby 2.2.2
  • Rails 4.2
  • rbenv
  • Arch Linux
  • PostgreSQL数据库

错误消息

rake aborted! LoadError: libncursesw.so.5: cannot open shared object file: No such file or directory - /home/adham/.rbenv/versions/2.2.2/lib/ruby/2.2.0/x86_64-linux/readline.so /home/adham/.gem/ruby/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require' /home/adham/.gem/ruby/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require' /home/adham/.gem/ruby/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each' /home/adham/.gem/ruby/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require' /home/adham/.gem/ruby/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each' /home/adham/.gem/ruby/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require' /home/adham/.gem/ruby/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require' /home/code/kahareb/config/application.rb:7:in `<top (required)>' /home/code/kahareb/Rakefile:4:in `<top (required)>' (See full trace by running task with --trace)

1 个答案:

答案 0 :(得分:6)

我在上次Arch Linux更新后尝试运行rails console时遇到了同样的错误消息,我解决了重新安装ruby的问题(​​使用rvm)。请尝试以下方法:

$ rvm reinstall 2.2.2