【问题标题】:libsndfile.so.1: cannot open shared object file: No such file or directorylibsndfile.so.1:无法打开共享对象文件:没有这样的文件或目录
【发布时间】:2016-11-23 14:49:16
【问题描述】:
libsndfile.so.1: cannot open shared object file: No such file or directory - /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static/ruby-audio-1.6.1/rubyaudio_ext.so (LoadError)
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:6:in `require'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:6:in `rescue in <top (required)>'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/ruby-audio-1.6.1/lib/ruby-audio.rb:1:in `<top (required)>'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/json-waveform-0.2.1/lib/json-waveform.rb:3:in `require'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/json-waveform-0.2.1/lib/json-waveform.rb:3:in `<top (required)>'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
  /var/app/current/config/application.rb:7:in `<top (required)>'
  /var/app/current/config/environment.rb:2:in `require'
  /var/app/current/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>

但是当我检查为时

"ll  /opt/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static/ruby-audio-1.6.1/"

文件存在于 redhat aws 服务器中。

我该如何解决这个问题? 谢谢

【问题讨论】:

  • 尝试apt-get install libsndfile1-dev然后重试
  • 你能把你的passenger.conf文件贴在上面吗?
  • 它是 aws redhat 机器。通过这种方式,如果我尝试使用“yum install libsndfile1-dev”给我以下消息“没有可用的包 libsndfile1-devel”。我是从“mega-nerd.com/libsndfile/files/libsndfile-1.0.27.tar.gz”手动安装的
  • @error 以上输出来自passenger.log

标签: ruby-on-rails amazon-web-services amazon-elastic-beanstalk


【解决方案1】:
ldconfig -p | grep libsndfile.so

如果这没有找到该文件,则查找您的 libsndfile-1.0.27 所在的位置。

将libsendfile-1.0.27路径的目录添加到/etc/ld.so.conf.d中的一个文件中。

将文件添加到 /etc/ld.conf.d 后运行ldconfig

【讨论】:

  • 完美答案!谢谢
猜你喜欢
  • 2021-04-05
  • 2019-08-14
  • 2021-08-18
  • 1970-01-01
  • 2021-07-19
  • 2021-07-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多