pg_config --sharedir points to the wrong folder.. is this a problem?

Started by Jennifer Treyover 16 years ago6 messagesgeneral
Jump to latest
#1Jennifer Trey
jennifer.trey@gmail.com

Hi,
First I installed postgres using the apt-get utility on ubuntu, and then
later uninstalled it to install postgres though the one-click installer.

Trying to find the share folder i ran pg_config and it shows the old path
: /usr/share/postgresql/8.3

I have a pg_config under my new installation as well
: /opt/PostgreSQL/8.4/bin/pg_config
but apperantly this is not being used in the global scope.

Am I missing something? Did I un-install incorrectly perhaps? Is this a
problem, could other files, pg_programs possibly have the same issue?

Sincerely / Jennifer

#2Sachin Srivastava
sachin.srivastava@enterprisedb.com
In reply to: Jennifer Trey (#1)
Re: pg_config --sharedir points to the wrong folder.. is this a problem?

On 07/30/2009 08:38 PM, Jennifer Trey wrote:

Hi,

First I installed postgres using the apt-get utility on ubuntu, and
then later uninstalled it to install postgres though the one-click
installer.

Trying to find the share folder i ran pg_config and it shows the old
path : /usr/share/postgresql/8.3

I have a pg_config under my new installation as well
: /opt/PostgreSQL/8.4/bin/pg_config
but apperantly this is not being used in the global scope.

Am I missing something? Did I un-install incorrectly perhaps? Is this
a problem, could other files, pg_programs possibly have the same issue?

Sincerely / Jennifer

It seems your uninstallation dint worked well. as you still have apt-get
installed pg_config which might be possible if you tried uninstalling
before stopping postgres server. (I am not so sure about it).

You can include /opt/PostgreSQL/8.4/bin folder to your PATH environment
variable to have one-click installers pg_config being used in global
scope. (Make sure you remove the apt-gets installation correctly)

--
Regards,
Sachin Srivastava
www.enterprisedb.com

#3Jennifer Trey
jennifer.trey@gmail.com
In reply to: Sachin Srivastava (#2)
Re: pg_config --sharedir points to the wrong folder.. is this a problem?

Yes, you are right. I didn't stop the server before un-installing. Not good.
I should have thought about that. Not sure how to repair that though.

running pg_config :

root@Ubuntu-904-jaunty-64-minimal:/opt/PostgreSQL/EnterpriseDB-TuningWizard#
pg_config
BINDIR = /usr/lib/postgresql/8.3/bin
DOCDIR = /usr/share/doc/postgresql-doc-8.3
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/8.3/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql/8.3/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/8.3/man
SHAREDIR = /usr/share/postgresql/8.3
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/8.3/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--build=x86_64-linux-gnu' '--prefix=/usr'
'--includedir=/usr/include' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var'
'--libexecdir=/usr/lib/postgresql-8.3' '--disable-maintainer-mode'
'--disable-dependency-tracking' '--srcdir=.'
'--mandir=/usr/share/postgresql/8.3/man'
'--with-docdir=/usr/share/doc/postgresql-doc-8.3'
'--sysconfdir=/etc/postgresql-common' '--datadir=/usr/share/postgresql/8.3'
'--bindir=/usr/lib/postgresql/8.3/bin'
'--includedir=/usr/include/postgresql/' '--enable-nls'
'--enable-integer-datetimes' '--enable-thread-safety' '--enable-debug'
'--disable-rpath' '--with-tcl' '--with-perl' '--with-python' '--with-pam'
'--with-krb5' '--with-gssapi' '--with-openssl' '--with-libxml'
'--with-libxslt' '--with-ldap' '--with-ossp-uuid' '--with-gnu-ld'
'--with-tclconfig=/usr/lib/tcl8.5' '--with-tkconfig=/usr/lib/tk8.5'
'--with-includes=/usr/include/tcl8.5'
'--with-system-tzdata=/usr/share/zoneinfo' '--with-pgport=5432' 'CFLAGS=-g
-O2 -g -Wall -O2 -fPIC' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,--as-needed'
'CC=cc' 'CPPFLAGS=' 'build_alias=x86_64-linux-gnu'
CC = cc
CPPFLAGS = -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.5
CFLAGS = -g -O2 -g -Wall -O2 -fPIC -Wall -Wmissing-prototypes
-Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -fwrapv -g
CFLAGS_SL = -fpic
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,--as-needed
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lkrb5 -lcom_err
-lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm
VERSION = PostgreSQL 8.3.7

It definetly points to the old version (8.3 .. why is 8.3 still in the
ubuntu package manager btw...?) ..

locate pg_config

/opt/PostgreSQL/8.4/bin/pg_config
/opt/PostgreSQL/8.4/include/ecpg_config.h
/opt/PostgreSQL/8.4/include/pg_config.h
/opt/PostgreSQL/8.4/include/pg_config_manual.h
/opt/PostgreSQL/8.4/include/pg_config_os.h
/opt/PostgreSQL/8.4/include/postgresql/server/pg_config.h
/opt/PostgreSQL/8.4/include/postgresql/server/pg_config_manual.h
/opt/PostgreSQL/8.4/include/postgresql/server/pg_config_os.h
/opt/PostgreSQL/8.4/share/man/man1/pg_config.1
/usr/bin/pg_config
/usr/share/man/man1/pg_config.1.gz

echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

I am guessing I should delete the pg_config (or else there would be a
conflict, right?) in the /usr/bin and run :

export PATH=/opt/PostgreSQL/8.4/bin/:$PATH

is that correct? ( I learned from you other message :) )

Is there other things that could have been destroyed by the bad
un-installment other than pg_config or was that it ?

Thanks allot / Jennifer

#4Daniel Verite
daniel@manitou-mail.org
In reply to: Jennifer Trey (#3)
Re: pg_config --sharedir points to the wrong folder.. is this a problem?

Jennifer Trey wrote:

locate pg_config

/opt/PostgreSQL/8.4/bin/pg_config
/opt/PostgreSQL/8.4/include/ecpg_config.h
/opt/PostgreSQL/8.4/include/pg_config.h
/opt/PostgreSQL/8.4/include/pg_config_manual.h
/opt/PostgreSQL/8.4/include/pg_config_os.h
/opt/PostgreSQL/8.4/include/postgresql/server/pg_config.h
/opt/PostgreSQL/8.4/include/postgresql/server/pg_config_manual.h
/opt/PostgreSQL/8.4/include/postgresql/server/pg_config_os.h
/opt/PostgreSQL/8.4/share/man/man1/pg_config.1
/usr/bin/pg_config
/usr/share/man/man1/pg_config.1.gz

echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

I am guessing I should delete the pg_config (or else there would be a
conflict, right?) in the /usr/bin

Actually you should restrain from doing that, because it would break the
package that installed that file, and then your system would become harder to
manage in the long run. It's better to act at the package level with the dpkg
command.

/usr/bin/pg_config is part of the libpq-dev package (this can be found with
dpkg -S /usr/bin/pg_config)

Probably you haven't uninstalled this package, which you can check by
running:
dpkg -s libpq-dev (look at the Status field). In this case, remove it
(apt-get remove libpq-dev)

You can also remove the postgresql-common and postgresql-client-8.3 packages
if they're still there and you want to avoid any possible conflict with your
other postgresql installation.
dpkg -l 'postgresql*' also displays the list of most PG-related packages and
whether they're installed or not.

Is there other things that could have been destroyed by the bad
un-installment other than pg_config or was that it ?

It doesn't look like the uninstallation of the server itself has gone bad in
any way. You mentioned removing the package without stopping the server
beforehand, but personally I doubt that the package uninstall process doesn't
do it automatically.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

#5Jennifer Trey
jennifer.trey@gmail.com
In reply to: Daniel Verite (#4)
Re: pg_config --sharedir points to the wrong folder.. is this a problem?

On Fri, Jul 31, 2009 at 3:02 AM, Daniel Verite <daniel@manitou-mail.org>wrote:

Jennifer Trey wrote:

locate pg_config

/opt/PostgreSQL/8.4/bin/pg_config
/opt/PostgreSQL/8.4/include/ecpg_config.h
/opt/PostgreSQL/8.4/include/pg_config.h
/opt/PostgreSQL/8.4/include/pg_config_manual.h
/opt/PostgreSQL/8.4/include/pg_config_os.h
/opt/PostgreSQL/8.4/include/postgresql/server/pg_config.h
/opt/PostgreSQL/8.4/include/postgresql/server/pg_config_manual.h
/opt/PostgreSQL/8.4/include/postgresql/server/pg_config_os.h
/opt/PostgreSQL/8.4/share/man/man1/pg_config.1
/usr/bin/pg_config
/usr/share/man/man1/pg_config.1.gz

echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

I am guessing I should delete the pg_config (or else there would be a
conflict, right?) in the /usr/bin

Actually you should restrain from doing that, because it would break the
package that installed that file, and then your system would become harder
to
manage in the long run. It's better to act at the package level with the
dpkg
command.

/usr/bin/pg_config is part of the libpq-dev package (this can be found with
dpkg -S /usr/bin/pg_config)

Probably you haven't uninstalled this package, which you can check by
running:
dpkg -s libpq-dev (look at the Status field). In this case, remove it
(apt-get remove libpq-dev)

Thanks.Yes, it was still there. I un-installed it.
Should I still add the pg_config to the $PATH ?

export PATH=/opt/PostgreSQL/8.4/bin/:$PATH

You can also remove the postgresql-common and postgresql-client-8.3
packages
if they're still there and you want to avoid any possible conflict with
your
other postgresql installation.
dpkg -l 'postgresql*' also displays the list of most PG-related packages
and
whether they're installed or not.

root@Ubuntu-904-jaunty-64-minimal:~# dpkg -l 'postgresql*'
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name Version Description
+++-==========================-==========================-====================================================================
pn postgresql <none> (no description
available)
un postgresql-7.4 <none> (no description
available)
un postgresql-8.0 <none> (no description
available)
rc postgresql-8.3 8.3.7-1 object-relational
SQL database, version 8.3 server
pn postgresql-client <none> (no description
available)
pn postgresql-client-8.3 <none> (no description
available)
pn postgresql-client-common <none> (no description
available)
rc postgresql-common 97 PostgreSQL
database-cluster manager
un postgresql-dev <none> (no description
available)
un postgresql-doc-8.3 <none> (no description
available)

Looks fine?

Is there other things that could have been destroyed by the bad
un-installment other than pg_config or was that it ?

It doesn't look like the uninstallation of the server itself has gone bad
in
any way. You mentioned removing the package without stopping the server
beforehand, but personally I doubt that the package uninstall process
doesn't
do it automatically.

Ok, that's good to hear. I must have missed un-installing the package
mentioned above.
What I did was to uninstall the postgresql-common which then removed some
other depending packages.I am not sure how this package got installed.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage:
http://www.manitou-mail.org

Sincerely / Jennifer

#6Daniel Verite
daniel@manitou-mail.org
In reply to: Jennifer Trey (#5)
Re: pg_config --sharedir points to the wrong folder.. is this a problem?

Jennifer Trey wrote:

Should I still add the pg_config to the $PATH ?

export PATH=/opt/PostgreSQL/8.4/bin/:$PATH

Yes.

pn postgresql <none> (no description
available)
un postgresql-7.4 <none> (no description
available)
un postgresql-8.0 <none> (no description
available)
rc postgresql-8.3 8.3.7-1 object-relational
SQL database, version 8.3 server
pn postgresql-client <none> (no description
available)
pn postgresql-client-8.3 <none> (no description
available)
pn postgresql-client-common <none> (no description
available)
rc postgresql-common 97 PostgreSQL
database-cluster manager
un postgresql-dev <none> (no description
available)
un postgresql-doc-8.3 <none> (no description
available)

Looks fine?

Definitely.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org