Thread: vacuumdb can't find libraries
Dear all, I have set up a cron job to run vacuumdb nightly. I can run it from the command line by hand without any difficulty; however, the output I get from the cron job is as follows: /usr/local/pgsql/bin/psql: error in loading shared libraries: libpq.so.2.1: cannot open shared object file: no such file or directory I have set the environment variable LD_LIBRARY_PATH from /etc/profile to point at /usr/local/pgsql/lib. What am I doing wrong? Any ideas wold be helpful! --Ray. -------------------------------------- Raymond O'Donnell rod@iol.ie rod@gti.ie --------------------------------------
Ray, > What am I doing wrong? Any ideas wold be helpful! Environment is dropped by cron. Either specify LD_LIBRARY_PATH in crontab explicitly, or add your PG libdir to /etc/ld.so.conf and rerun ldconfig. HTH Ed -- Well I tried to be meek And I have tried to be mild But I spat like a woman And I sulked like a child I have lived behind the walls That have made me alone Striven for peace Which I never have known Dire Straits, Brothers In Arms, The Man's Too Strong (Knopfler)
KuroiNeko wrote: > > Ray, > > > What am I doing wrong? Any ideas wold be helpful! > > Environment is dropped by cron. Either specify LD_LIBRARY_PATH in crontab > explicitly, or add your PG libdir to /etc/ld.so.conf and rerun ldconfig. > Or do what I do in my cron scripts: . ~/.bashrc ; mycommand -- Joseph Shraibman jks@selectacast.net Increase signal to noise ratio. http://www.targabot.com