Forum OpenACS Q&A: createlang plpgsql template1 error

Collapse
Posted by Ayman M on
Hi,

I'm trying to install PostgreSql as explained on:
https://openacs.org/doc/openacs-4/postgres.html
however, I came across an error.

When i ran:
  createlang plpgsql template1
I got the following error:
  /usr/bin/psql: relocation error: /usr/bin/psql: undefined symbol:
pg_encoding_to_char createlang: external error

Does anyone know how I can fix this?

When I ran ./configure, i added the options of --with-tcl and --
without-tk. Am I meant to add any options? I wasn't sure when I read
that document and I thought I may need those options even though I'm
not exactly sure what they do.

Thanks in advance,
Ayman

Collapse
Posted by Ayman M on
Please ignore the above message... I started the complete installation process again without any options and it seems to work so far.

I dont know if this has anything to do with the problem but I was previously using postgresql7.2.1 as opposed to 7.1.3 which im now using. I thought the newer version would be compatible and able to be used.

Collapse
Posted by Robert Ezman on
For those who are intested why this happens:

I ran into this but felt like getting to the bottom of it.

It appears that redhat 8.0 doesn't really uninstall postgres when you remove the database package via their gui.  So if you remove the database package and then build and install postgres you have potentially two different versions running.

Unfortunately the redhat rpm has precedence on the path and when you call createlang there is some versionitis that happenes.

I removed the rpm postgres ( via rpm -e ) and my error went away.  I'm not sure yet if there will be any fallout from this .  If something goes wrong I'll add another answer here.  I'm just trying to save the next person the time to figure out what is going wrong.

I ran the make installcheck and all seems to be ok now (although I had to delete the db and run inidb again for it to pass as it had an error on the first pass).

Collapse
Posted by Randy Ferrer on
Robert - Thnks for this post. I ran into exactly this situation after uninstalling PG rpm with the gui tool. rpm -e is the way to go. I went ahead and built PG again since I got errors. All is well now!