postgres install issue

Hey there,

I’ve installed postgres following Install and Configure PostgreSQL in openSUSE 11.0 | SUSE & openSUSE Even though, the issue I’m having is that every time I try and run psql, I get the following error:

psql: symbol lookup error: psql: undefined symbol: PQconnectdbParams

I’m just not sure how to proceed - any help would be appreciated.

Thanks,

Skip

Remarkable how old that article is (therefor dangerous to use) although to my eye it is still relevant.

Have you verified that the PostgrSQL Server is running? The following should return Active (exited) status.

systemctl status postgresql.service

If the service is running, maybe it didn’t get installed completely. Instead of the YAST command in your referenced guide, I’d recommend using zypper if already in a console, the following “force installs” to fix any install issues

zypper in -f postgresql-server

HTH,
TSU

UPDATE:

I have also install Zend Server CE 6.1 and have found what happens is lib/pq.so.5 gets pointed to the lib/pq.so.5 that gets install with zend instead of the one found in /usr/lib64/libpq.so.5. What is the best way to change lib/pq.so.5 to the correct version AFTER installing zend server?

Thanks,

Skip

Change the link. Note it appears you can not run both Zend and postgre at the same time.

Hey there,

That’s the root of my question - How does one change that link? I know postgres and zend server run with centos, so I’m not quite certain what you mean by

Note it appears you can not run both Zend and postgre at the same time.

Thanks,

Skip

Well what you described is a link. so use the ln command to point the link to the correct file. It is possible that Zend may run ok with the Postgre lib. Which version is newer?

Hey there,

I’ll check and see which is newer, but wasn’t sure if ln should get used or if there was something else for linking and unlinking libs.

Thanks,

Skip

Some people expressed their amazement about you usinng an 11.0 (did we ever have that)) documentation. But nobody bothered to aks on which version of openSUSE you are trying to implement that on. And you kept it as a secret.

That is someting that realy amazes me.

Hey there,

I’m using version 12.3.

Thanks,

Skip

Hey there,

The problem was ended up being a result of the libpq.so.5 that was installed with Zend server. I checked to see what lib’s were being used by psql with

ldd $(which psql)

This is what initially tipped me to the problem.

I resolved the issues by adding

export LD_LIBRARY_PATH="/usr/lib64"

to my .bashrc and then logging out and in again.

Problem solved rotfl!rotfl!rotfl!rotfl!

Thanks,

Skip

Hi Skip:

Kudos to you for coming up with a fix. Just a note on LD_LIBRARY_PATH. You might be interested to read David Barr’s Why LD_LIBRARY_PATH is bad article.

To rather brutally summarize that article: LD_LIBRARY_PATH is not bad in and of itself, but “export LD_LIBRARY_PATH=something” in .bashrc is probably not what you want to be doing.

The author of that article recommends using a wrapper for situations like this. The wrapper would look something like this:


#!/bin/bash
( LD_LIBRARY_PATH="something" ; /path/to/binary)

Hey there,

That was an interesting article. I think in my case, what I’ve done will work just fine since I have more than one app that needs to get to this lib.

If for some reason, I need to start compiling stuff, my solution will definitely become a problem.

Thanks,

Skip