Issue #103 invalid

Installation problems not related to libpq-dev

Anonymous created an issue

I recently ran into an issue like the one listed in issue #89, however, I have libpq-dev installed. I posted to StackOverflow ( and was advised to submit a bug report; uninstalling and re-installing dependencies did not seem to do much.

The results of gem_make.out, ldd /usr/lib/, and mkmf.log can be found in this gist:

I am running: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux] rvm 1.10.1 (system) gem 1.8.15 psql (PostgreSQL) 8.4.9 (from Ubuntu's repo)

Manually specifying the path to pg_config does not appear to change anything. It seems as if it's not using pg_config for all values (pg_config --libs, in particular).

The problem began occurring after upgrading to Ruby 1.9.3 from 1.9.2 using rvm install 1.9.3 && rvm use --default 1.9.3 && rvmsudo gem install pg, however, after reverting to 1.9.2 and attempting to re-install the gem the problem persists (even though it was working fine before).

Comments (6)

  1. Anonymous

    -Wl,-Bsymbolic-functions -Wl,--as-needed -Wl,--as-needed

    -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err -lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm

    (also added to the gist)

  2. Sam Whited

    Someone has suggested that it is a problem with using libraries that RVM provides instead of the system libraries.

    They did: `mv /.rvm/usr/lib /.rvm/usr/lib_rvm`

    It's a hack, but apparently it has worked for several people.

  3. Anonymous

    It's a hack, but apparently it has worked for several people.

    This completely and totally worked for me.

    Funny thing is this hasn't come up before ; I strongly suspect it's rvm's fault, and not pg's.

  4. Michael Granger repo owner

    The OpenSSL library that is used by Ruby's openssl library and the version used by libpq must be the same, or bad things happen.

    The reason extconf.rb doesn't used pg_config's --libs is that it includes things like -lreadline and -lpam, which are necessary for the `psql` command line tool, but aren't dependencies of libpq, and so aren't typically included in libpq-dev (or similar packages on other systems).

  5. Log in to comment