libpq.so.5:无法打开共享对象文件:没有这样的文件或目录 - /gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/pg-0.14.1/lib /pg_ext.so

时间:2013-03-22 15:49:40

标签: ruby linux unix shared-libraries redhat

我正在尝试在linux服务器上运行脚本(ruby脚本)。我得到以下错误: 我不确定问题是什么,但它看起来像共享库问题。 Linux专家,请您指教一下这个问题可能是什么?

libpq.so.5: cannot open shared object file: No such file or directory - /gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/pg-0.14.1/lib/pg_ext.so
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `block in require'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/pg-0.14.1/lib/pg.rb:4:in `<top (required)>'
<internal:lib/rubygems/custom_require>:33:in `require'
<internal:lib/rubygems/custom_require>:33:in `rescue in require'
<internal:lib/rubygems/custom_require>:29:in `require'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `block in require'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/postgresql_adapter.rb:9:in `postgresql_connection'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `new_connection'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:237:in `checkout_new_connection'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:191:in `block (2 levels) in checkout'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:187:in `loop'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:187:in `block in checkout'
/gds/apps/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `checkout'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:94:in `connection'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:317:in `retrieve_connection'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in `retrieve_connection'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/arel-2.0.2/lib/arel/table.rb:127:in `table_cache'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/arel-2.0.2/lib/arel/table.rb:122:in `tables'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/arel-2.0.2/lib/arel/table.rb:118:in `table_exists?'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/arel-2.0.2/lib/arel/table.rb:97:in `[]'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation/predicate_builder.rb:23:in `block in build_from_hash'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation/predicate_builder.rb:9:in `each'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation/predicate_builder.rb:9:in `map'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation/predicate_builder.rb:9:in `build_from_hash'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation/query_methods.rb:227:in `build_where'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation/query_methods.rb:77:in `where'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/relation.rb:221:in `destroy_all'
/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/activerecord-3.0.5/lib/active_record/base.rb:439:in `destroy_all'
./edx_vert_to_pg.rb:43:in `<main>'

1 个答案:

答案 0 :(得分:-2)

libpq.so.5无法读取此文件

/gds/apps/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/gems/pg-0.14.1/lib/pg_ext.so

文件存在吗? 该文件是否具有正在执行的程序读取和失败的正确权限?

应该让你去