Please support VectorLinux!

Author Topic: Basic Books / postgresql / install error (solved)  (Read 4569 times)

sledgehammer

  • Vectorian
  • ****
  • Posts: 1451
Basic Books / postgresql / install error (solved)
« on: July 19, 2007, 10:39:33 am »
Hi folks:

I can't get Basic Books, a general ledger accounting system, to load on Vector.  It works fine on Fedora 6.  Please excuse errors I might make here as I am not too familiar with terminology.

Basic Books requires postgresql to be up and running, so I got postgresql up and running first (ver 8.2.4).  Following the Basic Books install, it wouldn't run, giving me an libpq.so.4 error.  So I linked to libpq.so.5, which is in /opt/postgres/lib.  Then I got a "floating point exception."  Called Basic Books and was told that my link was OK but Basic Books (and most other software) looks for the shared libraries in /usr/lib.  Copied libpq.so, libpq.so.5 and libpq.so.5.0 over to /usr/lib and linked again, but get same "floating point exception" error.

Any suggestions would be appreciated. 

John
« Last Edit: August 25, 2007, 03:54:48 pm by lawquest »
VL7.0 xfce4 Samsung RF511

Joe1962

  • Administrator
  • Vectorian
  • *****
  • Posts: 2499
    • Joe1962's Website
Re: Basic Books / postgresql / install error
« Reply #1 on: July 19, 2007, 12:14:30 pm »
Does it work with 8.2.4 on Fedora? Perhaps it needs an earlier version, which is why it looks for libpq.so.4. Also, it's best to just symlink libs, no need to copy them. Anyway, an app shouldn't have hard-coded lib paths, should it?
O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10

GrannyGeek

  • Packager
  • Vectorian
  • ****
  • Posts: 2567
Re: Basic Books / postgresql / install error
« Reply #2 on: July 19, 2007, 05:14:31 pm »
Did you run
ldconfig
as root after you fiddled with the libraries?
--GrannyGeek
Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller

sledgehammer

  • Vectorian
  • ****
  • Posts: 1451
Re: Basic Books / postgresql / install error
« Reply #3 on: July 20, 2007, 07:30:10 am »


Basic Books is running on postgresql 8.1.9-1 on my Fedora Core 6 computer.

I had tried symlinks (ln -s) before writing the forum (and before copying libqp).

BasicBooks tells me "There is no hard coded lib path in the software.  The makefile compile does the linking.  If you create the symlink, any forward (greater version number) should work."

I will try the idconfig suggestion.

Thanks

John
VL7.0 xfce4 Samsung RF511

Joe1962

  • Administrator
  • Vectorian
  • *****
  • Posts: 2499
    • Joe1962's Website
Re: Basic Books / postgresql / install error
« Reply #4 on: July 20, 2007, 10:05:30 am »
The postgresql package from the repo installs a script (/etc/profile.d/postgresql.sh) that adds (among other things) the postgresql lib path to the LD_LIBRARY_PATH environment variable on boot, so it should not be necessary to symlink or copy the libs anywhere. The exception is if the lib version number is greater than the needed one, in which case a symlink in the same dir as the lib should do. However, upward compatibility in this case depends on the developers of the lib and cannot be guaranteed by anyone else. Try an earlier postgresql package from the old/ repo, but first save the profile script, as I don't remember on which version it was first added.
O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10

sledgehammer

  • Vectorian
  • ****
  • Posts: 1451
Re: Basic Books / postgresql / install error
« Reply #5 on: July 21, 2007, 10:34:03 am »
Before undertaking Joe1962's suggestion that I try an older version of postgresql, I have a couple of questions:

1. Re grannygeek's idconfig suggestion, I can't seem to get idconfig to run.  I just don't know what it is.

2.  I get a "floating point exception" when I run helloworld.  This is the same error I get when trying to run BasicBooks. Is there something I need to add to compile helloworld?  If so, perhaps that might solve my BasicBooks problem.

Thanks much for the help to date.

John 
VL7.0 xfce4 Samsung RF511

rbistolfi

  • Packager
  • Vectorian
  • ****
  • Posts: 2299
Re: Basic Books / postgresql / install error
« Reply #6 on: July 21, 2007, 12:11:55 pm »
I cant help you on the others problems, but is ldconfig, not idconfig, with a non-capitol L
"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!

exeterdad

  • Packager
  • Vectorian
  • ****
  • Posts: 2046
Re: Basic Books / postgresql / install error
« Reply #7 on: July 21, 2007, 03:30:36 pm »
Quote
idconfig
Nice catch rbistolfi  ;)

sledgehammer

  • Vectorian
  • ****
  • Posts: 1451
Re: Basic Books / postgresql / install error
« Reply #8 on: July 22, 2007, 06:46:58 pm »
This is becoming pretty complex for a fellow who is mostly an end-user.

My problem now is starting postgresql.  I deleted version 8.2.4 (using G-slapt...deleted everything that came up installed when I typed "postgresql" in the search window).  I then loaded postgresql 8.1.4 along with the libpqXX file from Slackware 10.2 repository.

I then moved the postgresql.sh that I had saved back to /etc/profile.d/ and ran that script as root from /etc/profile.d and no error (or message). I then exited from root and typed su postgres and entered my password, which I had changed to "postgres" also. That switched me to postgres but gave several errors, as follows:

root:# exit
bash-3.1$ su postgres
Password:
You are working as johwhi
Frequently used programs:
Configuration  : vasm
File manager   : mc (press F2 for useful menu)
Editor         : mcedit, vi
Multimedia     : alsamixer, play
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
xhost:  unable to open display ":0.0"
vector://home/johwhi
postgres:$ create junk
bash: create: command not found
vector://home/johwhi
postgres:$

I think this means that postgresql is not running (easy to tell with 8.2.4 as a "start" icon and a "stop" icon is on the menu, but no such icon on 8.1.4). Again called BasicBooks but received no suggestions that would start postgres.  I need to start it in order to try Joe1962's suggestion to use an older version of postgres and would appreciate any further suggestions.

I have most appreciated the help received from this forum to date. 

John 
VL7.0 xfce4 Samsung RF511

Joe1962

  • Administrator
  • Vectorian
  • *****
  • Posts: 2499
    • Joe1962's Website
Re: Basic Books / postgresql / install error
« Reply #9 on: July 22, 2007, 06:59:19 pm »
I meant a VL package of postgresql from the old subrepo, they have the menu and first install script "enhancements". This was the oldest version built for 5.8:

http://vectorlinux.osuosl.org/veclinux-5.8/old/dev/postgresql-8.1.5-i586-5vl58.tlz
O'Neill (RE the Asgard): "Usually they ask nicely before they ignore us and do what they damn well please."
http://joe1962.bigbox.info
Running: VL 7 Std 64 + self-cooked XFCE-4.10

sledgehammer

  • Vectorian
  • ****
  • Posts: 1451
Re: Basic Books / postgresql / install error
« Reply #10 on: July 22, 2007, 11:09:15 pm »
Thanks.

I removed postgresql 8.1.4 (slackware) and installed vector 8.1.5 postgres from the old repository.  It did not seem to load right and I was not sure it started.  In any event, when running BasicBooks, it gave the same "floating point exception" error and refused to open basic books.  I "updated" it to postgresql 8.2 (on the old repository) and it loaded right and started right but when linked to libpq.so.4 gave the same "floating point error."  Thinking that an even older version might work, I then downloaded Vector 8.1.4. but had the same problem as with 8.1.5 in that when running the "first time configuration" program, it seems to bug out, i.e it did something, but didn't ask for root or otherwise act properly.

Basic Books tells me that my problems have nothing to do with what version of postgresql I am using.  They have sent me a "helloworld" file which gives the same "floating point exception" error that BasicBooks gives and BasicBooks says that until I figure out how to get helloworld to run, I won't get BasicBooks to run.

I would like to email that program, helloworld, and get your comments.  If this is a good idea, please sent me an address I can email to.

Thx

John

VL7.0 xfce4 Samsung RF511

sledgehammer

  • Vectorian
  • ****
  • Posts: 1451
Re: Basic Books / postgresql / install error
« Reply #11 on: August 25, 2007, 03:53:59 pm »
Thanks to all, particularly Joe1962, for helping me solve this problem. 

The problem was the libpq.so link.  BasicBooks requires 3.0.  Vector 5.8 running Postgres 8.4.2 uses 5.0.  BasicBook's install instructions, expressly for Fedora, put the link in /usr/lib.  However, in Vector 5.8 running Postgresql 8.4.2, the link must be in /opt/postgresql/lib.  So, go to that directory, change to root, and type "ln -s libpq.so.5.0 libpq.so.3", without the quotes.  Works fine.

John
VL7.0 xfce4 Samsung RF511