Installation problems not related to libpq-dev

Anonymous avatarAnonymous 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

    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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.