Setting up Postgresql on Linux

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • phil campaigne

    Setting up Postgresql on Linux

    Hello,
    when I login to linux and check the env's I see:
    PATH=/usr/local/pgsql/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/postgres/bin:/opt/IBMJava2-14/bin:/opt/IBMJava2-14/jre/bin:/usr/local/pgsql/bin
    LD_LIBRARY_PATH =/usr/local/pgsql/lib

    However after I successfully start postgresql using
    /etc/init.d/postgres start
    /etc/init.d/postgres status

    I cannot execute the following:
    psql testdb
    psql: relocation error: psql: undefined symbol: PQgetssl

    Then if I execute from the command line:
    LD_LIBRARY_PATH =/usr/local/pgsql/lib
    export LD_LIBRARY_PATH

    PATH=/usr/local/pgsql/bin:$PATH
    export PATH

    then psql testdb works!

    What's going on???
    thanks,
    Phil




    ---------------------------(end of broadcast)---------------------------
    TIP 4: Don't 'kill -9' the postmaster

  • Tom Lane

    #2
    Re: Setting up Postgresql on Linux

    phil campaigne <pcampaigne@cha rter.net> writes:[color=blue]
    > when I login to linux and check the env's I see:
    > PATH=/usr/local/pgsql/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/postgres/bin:/opt/IBMJava2-14/bin:/opt/IBMJava2-14/jre/bin:/usr/local/pgsql/bin
    > LD_LIBRARY_PATH =/usr/local/pgsql/lib[/color]

    What are you checking exactly? If it's not the output of "env" then
    I would say you are looking at the wrong thing. Possibly you're looking
    at a profile file that neglects to "export LD_LIBRARY_PATH ", or some such.
    [color=blue]
    > I cannot execute the following:
    > psql testdb
    > psql: relocation error: psql: undefined symbol: PQgetssl[/color]

    This is clearly picking up an incompatible version of libpq.so
    (specifically, psql was built with SSL support but libpq.so wasn't).
    I'd suggest trying "which psql" and "ldd" on the psql executable
    to figure out exactly what's what.

    regards, tom lane

    ---------------------------(end of broadcast)---------------------------
    TIP 8: explain analyze is your friend

    Comment

    • scott.marlowe

      #3
      Re: Setting up Postgresql on Linux

      On Thu, 4 Mar 2004, phil campaigne wrote:
      [color=blue]
      > Hello,
      > when I login to linux and check the env's I see:
      > PATH=/usr/local/pgsql/bin:/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/postgres/bin:/opt/IBMJava2-14/bin:/opt/IBMJava2-14/jre/bin:/usr/local/pgsql/bin
      > LD_LIBRARY_PATH =/usr/local/pgsql/lib
      >
      > However after I successfully start postgresql using
      > /etc/init.d/postgres start
      > /etc/init.d/postgres status
      >
      > I cannot execute the following:
      > psql testdb
      > psql: relocation error: psql: undefined symbol: PQgetssl
      >
      > Then if I execute from the command line:
      > LD_LIBRARY_PATH =/usr/local/pgsql/lib
      > export LD_LIBRARY_PATH
      >
      > PATH=/usr/local/pgsql/bin:$PATH
      > export PATH
      >
      > then psql testdb works!
      >
      > What's going on???[/color]

      Are you exporting those same settings in your .bash_profile or whatever is
      setting up your environ?


      ---------------------------(end of broadcast)---------------------------
      TIP 2: you can get off all lists at once with the unregister command
      (send "unregister YourEmailAddres sHere" to majordomo@postg resql.org)

      Comment

      Working...