{"id":6790,"date":"2014-04-23T08:06:09","date_gmt":"2014-04-23T08:06:09","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/pg_config-ruby-pg-postgresql-9-0-problem-after-upgrade-centos-5-collection-of-common-programming-errors\/"},"modified":"2014-04-23T08:06:09","modified_gmt":"2014-04-23T08:06:09","slug":"pg_config-ruby-pg-postgresql-9-0-problem-after-upgrade-centos-5-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/pg_config-ruby-pg-postgresql-9-0-problem-after-upgrade-centos-5-collection-of-common-programming-errors\/","title":{"rendered":"pg_config, ruby pg, postgresql 9.0 problem after upgrade, centos 5-Collection of common programming errors"},"content":{"rendered":"<p>After upgrade postgresql 8.1 to 9.0 ive noticed issues with libraries dependency. Postgresql works fine (connection, queries).<\/p>\n<pre><code>yum list postgresql*\nInstalled Packages\npostgresql.i386 9.0.0-1PGDG.el5 installed\npostgresql-debuginfo.i386 9.0.0-1PGDG.el5 installed\npostgresql-devel.i386 9.0.0-1PGDG.el5 installed\npostgresql-libs.i386 9.0.0-1PGDG.el5 installed\npostgresql-odbcng.i386 0.90.101-2.el5 installed\npostgresql-plruby.i386 0.5.1-5.el5 installed\npostgresql-server.i386 9.0.0-1PGDG.el5 install\n<\/code><\/pre>\n<p>but when im trying to install &#8216;pg&#8217; for ruby, ive received<\/p>\n<pre><code>gem install pg\nBuilding native extensions.  This could take a while...\nERROR:  Error installing pg:\n        ERROR: Failed to build gem native extension.\n\n\/usr\/local\/bin\/ruby extconf.rb\nchecking for pg_config... no\nchecking for libpq-fe.h... no\nCan't find the 'libpq-fe.h header\n*** extconf.rb failed ***\nCould not create Makefile due to some reason, probably lack of\nnecessary libraries and\/or headers.  Check the mkmf.log file for more\ndetails.  You may need configuration options.\n<\/code><\/pre>\n<p>When trying with another ruby-postgres driver, ive got<\/p>\n<pre><code>yum install ruby-postgres\nruby-postgres-0.7.1-5.el5.i386 from epel has depsolving problems\n  --&gt; Missing Dependency: libpq.so.4 is needed by package ruby-postgres-0.7.1-5.el5.i386 (epel)\n<\/code><\/pre>\n<p>and<\/p>\n<pre><code>locate libpq.so.4\n\/usr\/lib\/libpq.so.4\n\/usr\/lib\/libpq.so.4.1\n<\/code><\/pre>\n<p>also exported path<\/p>\n<pre><code>LD_LIBRARY_PATH=\/usr\/pgsql-9.0\/lib\nexport LD_LIBRARY_PATH\n<\/code><\/pre>\n<p>after running ruby script with &#8220;require pg&#8221; (works on 8.1), ive got:<\/p>\n<pre><code>\/usr\/local\/lib\/ruby\/site_ruby\/1.8\/i686-linux\/pg_ext.so: libpq.so.4: cannot open shared object file: No such file or directory - \/usr\/local\/lib\/ruby\/site_ruby\/1.8\/i686-linux\/pg_ext.so (LoadError)\n        from \/usr\/local\/lib\/ruby\/site_ruby\/1.8\/rubygems\/custom_require.rb:29:in `require'\n        from \/usr\/local\/lib\/ruby\/site_ruby\/1.8\/pg.rb:12\n        from \/usr\/local\/lib\/ruby\/site_ruby\/1.8\/rubygems\/custom_require.rb:29:in `gem_original_require'\n        from \/usr\/local\/lib\/ruby\/site_ruby\/1.8\/rubygems\/custom_require.rb:29:in `require'\n<\/code><\/pre>\n<p>Any suggestions what to do more?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After upgrade postgresql 8.1 to 9.0 ive noticed issues with libraries dependency. Postgresql works fine (connection, queries). yum list postgresql* Installed Packages postgresql.i386 9.0.0-1PGDG.el5 installed postgresql-debuginfo.i386 9.0.0-1PGDG.el5 installed postgresql-devel.i386 9.0.0-1PGDG.el5 installed postgresql-libs.i386 9.0.0-1PGDG.el5 installed postgresql-odbcng.i386 0.90.101-2.el5 installed postgresql-plruby.i386 0.5.1-5.el5 installed postgresql-server.i386 9.0.0-1PGDG.el5 install but when im trying to install &#8216;pg&#8217; for ruby, ive received gem [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6790","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6790"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6790\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}