Forum OpenACS Q&A: open FTS & tsearch
All seems to go ok until I get here:
postgres:/usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts$ /usr/local/pgsql/bin/psql birdnotes -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
tsearch.sql mentions $libdir/tsearch which generates the error: cannot stat $libdir/tsearch file or directory doesn't exist.
Thanks for any help
These are the things I've done so all went ok in Debian Woody: when it complains about missing flex edit the ../src/Makefile.global and add /usr/bin/flex to the FLEX paramater.
After running ./configure...etc... I have copied the contents of /usr/include/tcl8.3 into /Search...bla.bla/include
I did try to edit the Makefile.global as recommended adding -I /usr/include/tcl8.3, but when compiling snowball it crashes even so, hence the copying of the contents of the tcl8.3
... my remaining problem is: apt-get install libssl-dev
make OPENSSL=/usr/lib/ssl. the last command doesn't work, could anyone tell me what else needs to be done ?
apt-get install openssl
check that everything installed properly, in /usr/lib/ssl/ do a ls-al and check for the link openssl.cnf -> /etc/ssl/openssl.cnf (if not just apt-get remove --purge openssl and start over)
apt-get install libssl-dev ...then all goes according with the instructions.
When reaching the point of generating certificates: as user service0 in /web/service0/etc/certs do 'perl /usr/lib/ssl/misc/CA.pl -newcert' without the commas, all else works as per the instructions.
I'm trying to set up Search-OpenFTS-tcl-0.3.2 with openacs-4-6-3 and have exactly the same problem but cannot find the solution.
I'm following the instructions in: https://openacs.org/doc/openacs-4-6-3/nextsteps.html and https://openacs.org/doc/openacs-4-6-3/aolserver.html. Everything is all right till I try:
ehrms:~> /usr/local/pgsql/bin/psql ehrms -r /usr/local/src/postgresql-7.2.4/contrib/tsearch/tsearch.sql
psql:/usr/local/src/postgresql-7.2.4/contrib/tsearch/tsearch.sql:8: ERROR: stat failed on file '$libdir/tsearch': No such file or directory
psql:/usr/local/src/postgresql-7.2.4/contrib/tsearch/tsearch.sql:13: NOTICE: current transaction is aborted, queries ignored until end of transaction block
Thanks for any help
- a file system search for the location of the libdir directory - try manually in the path shown above (/usr/local/src/postgresql-7.2.4/contrib/tsearch/). Once you find it check the file permissions and ownership of the directory and the files within.
- check that $libdir is referencing the correct path. Look in the sql files that you are passing to psql and check where $libdir is set and what it is set to.
- try to find 'tsearch' manually - do an 'updatedb' followed by a 'locate tsearch*'
Hope this helps.
As you pointed it has a simple solution. The $libdir was not correctly set.
Thank you, I was confused with this.
After setting it everything has been right. Now I'm trying to index existing etp content, with some difficulties...
I'm trying with this:
insert into search_observer_queue(select revision_id, current_timestamp, 'INSERT' from cr_revisions r,cr_items i where r.item_id=i.item_id and i.content_type='etp_page_revision' and r.revision_id = i.live_revision);
and, even, with some more like this:
insert into search_observer_queue(select revision_id, current_timestamp, 'INSERT' from cr_items i where i.content_type='content_folder');
with no success.
Any ideas ?
Thanks in advance.
ERROR: could not access file "$libdir/tsearch": no such file or directory
It is not clear to be what '$libdir' should be set to, or what step or environment variable should be setting this?
Is this indicative of a permissions problem - i.e. I installed something as root that should have been installed as service?
Can someone tell me what '$libdir' should be set to, and give an example of where to set it? ( user environment variable, in the tsearch.sql file, etc. )
thanks for your help,
[service] pg_config --pkglibdir
If, for some reason you have different bits of postgres installed in different places ( say if someone installed an rpm, but you had to go back to source to install OpenFTS ), then you might find yourself in this situation.
In my case, postgres libraries were installed in
Copying the contents of /usr/lib/postgres to /usr/lib/pgsql solved my problem. There were not many google hits for
'tsearch2 postgres libdir pkglibdir'