{"id":8685,"date":"2015-11-03T00:40:46","date_gmt":"2015-11-03T00:40:46","guid":{"rendered":"https:\/\/wp.okra.host\/article\/postgresql-gem-install-fails\/"},"modified":"2021-03-07T14:47:13","modified_gmt":"2021-03-07T13:47:13","slug":"postgresql-gem-install-fails","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/postgresql-gem-install-fails\/","title":{"rendered":"PostgreSQL gem install fails"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>Attempting to install the Ruby gem &#8220;pg&#8221; or other PostgreSQL-dependent gems on <a href=\"https:\/\/kb.okra.host\/de\/platform\/determining-platform-version\/\">v6+ Plattformen<\/a> fail with a similar sample response:<\/p>\n<pre>Can't find the PostgreSQL client library (libpq)\r\n*** extconf.rb failed ***\r\nCould not create Makefile due to some reason, probably lack of necessary\r\nlibraries and\/or headers. Check the mkmf.log file for more details. You may\r\nneed configuration options.\r\nProvided configuration options:\r\n --with-opt-dir<\/pre>\n<h2 id=\"cause\" >Ursache<\/h2>\n<p>PostgreSQL libraries are located in a separate directory, <code>\/usr\/pgsql-XX<\/code>, where <em>XX<\/em> is the version number on these platforms. This path is not picked up in normal configuration.<\/p>\n<h2 id=\"solution\" >L\u00f6sung<\/h2>\n<p>Install the gem manually while specifying a path to <code>pg_config<\/code>, which is located in <code>\/usr\/pgsql-XX\/bin<\/code>. For example, on Sol, which ships with PostgreSQL 9.3, the correct command to install pg is as follows:<\/p>\n<pre data-language=\"shell\"><code>gem install pg -v '0.18.3' -- --with-pg-config=\/usr\/pgsql-9.3\/bin\/pg_config<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>Overview Attempting to install the Ruby gem &#8220;pg&#8221; or other PostgreSQL-dependent gems on v6+ platforms fail with a similar sample response: Can&#8217;t find the PostgreSQL client library (libpq) *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and\/or headers. Check the mkmf.log&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[66],"ht-kb-tag":[],"class_list":["post-8685","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-ruby"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8685"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8685\/revisions"}],"predecessor-version":[{"id":8686,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8685\/revisions\/8686"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8685"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8685"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}