Issue #128 resolved

Your PostgreSQL is too old - but it's not?

AstonJ
created an issue

Hi, I'm trying to install the PG gem, but it keeps telling me my Postgres is too old, even though I have upgraded it to psql (PostgreSQL) 9.1.3 (as per the instructions here http://www.davidghedini.com/pg/entry/install_postgresql_9_on_centos)

Here is my full error message:

{{{ Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb

checking for pg_config... yes Using config values from /usr/bin/pg_config checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for pg_config_manual.h... yes checking for PQconnectdb() in -lpq... yes checking for PQconnectionUsedPassword()... no Your PostgreSQL is too old. Either install an older version of this gem or upgrade your database. extconf.rb failed Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. }}}

I can confirm the following packages are installed: {{{ Setting up Install Process Package postgresql91-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version Package postgresql91-devel-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version Package postgresql91-server-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version Package postgresql91-libs-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version Package postgresql91-contrib-9.1.3-1PGDG.rhel5.x86_64 already installed and latest version Nothing to do }}}

Any idea what I'm doing wrong? Thanks in advance.

(I am using CentOS 5.8 and Ruby 1.9.3 and Rails 3.2.5)

Comments (9)

  1. AstonJ reporter

    Hi Michael - which one? There's loads:

    /usr/local/src/ruby-1.9.3-p194/ext/-test-/add_suffix/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/-test-/array/resize/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/-test-/bug-3571/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/-test-/bug-3662/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/-test-/funcall/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/-test-/load/dot.dot/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/-test-/old_thread_select/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/-test-/st/numhash/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/-test-/string/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/-test-/wait_for_single_fd/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/bigdecimal/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/continuation/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/coverage/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/curses/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/date/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/dbm/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/digest/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/digest/bubblebabble/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/digest/md5/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/digest/rmd160/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/digest/sha1/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/digest/sha2/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/dl/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/dl/callback/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/etc/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/fcntl/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/fiber/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/fiddle/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/gdbm/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/iconv/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/io/console/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/io/nonblock/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/io/wait/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/json/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/json/generator/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/json/parser/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/mathn/complex/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/mathn/rational/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/nkf/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/objspace/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/openssl/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/pathname/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/psych/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/pty/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/racc/cparse/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/readline/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/ripper/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/sdbm/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/socket/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/stringio/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/strscan/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/syck/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/syslog/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/tk/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/win32ole/mkmf.log
    /usr/local/src/ruby-1.9.3-p194/ext/zlib/mkmf.log
    
    
    
  2. AstonJ reporter

    I think I got it! Used:

    gem install pg -- --with-pgsql-lib=/usr/pgsql-9.1/lib --with-pg-config=/usr/pgsql-9.1/bin/pg_config
    

    And it seems to have done it! I;ll check tomorrow tho as it's 3am here and I'm knackered..

  3. AstonJ reporter

    I spoke too soon - although I can install the individual gem as per above, when I try 'bundle' for my app it fails saying ti can't find the 'libpq-fe.h header. Do I need to add this to the includes? If so do you know how?

  4. Log in to comment