关于postgresql:无法在CENTOS上的rails 4中安装hstore

Not able to install hstore in rails 4 on CENTOS

我使用rails 4和数据库作为postgres9.4。使用hstore类型列为动态字段。我收到错误

PG::UndefinedFile: ERROR: could not open extension control file
"/usr/pgsql-9.4/share/extension/hstore.control": No such file or
directory : CREATE EXTENSION IF NOT EXISTS
"hstore"/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in async_exec'
/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in
block in exec_no_cache'
/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in block in log'
/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in
instrument'
/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in log'
/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in
exec_no_cache'
/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:584:in execute_and_clear'
/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in
exec_query'
/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:342:in enable_extension'
/var/www/Q3/mailchimp/campaign_app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/migration.rb:662:in
block in method_missing'

我试试

1
2
sudo yum install postgresql postgresql-contrib
sudo yum install postgresql-server.x86_64 postgresql94-contrib.x86_64

但不要为我工作


在Centos我错误地安装了postgres8.3软件包,但我使用的是postges9.4。
删除postgres8.3包后,它工作正常