[CWB] BNCweb not displaying after fresh installation
Stephanie Evert
stefanML at collocations.de
Sun Sep 4 10:35:28 CEST 2022
Dear Andrés,
it looks like quite a lot of software is outdated and/or mis-configured on your system. I'll address some issues below inline, but first off: since this appears to be a new BNCweb installation, are you sure that you've got the most up-to-date version of the source code? I'm asking because one of your error messages suggests that it's trying to use a very old version of the Perl modules which has been unsupported for at least a decade.
(Questions about the BNCweb distribution will have to be directed to Sebastian Hoffmann. I know that he's been making some additions in recent years, so there should be an up-to-date distro available somewhere.)
> cp /etc/apache2/conf-available/serve-cgi-bin.conf /etc/apache2/conf-available/serve-cgi-bnc.conf
> nano /etc/apache2/conf-available/serve-cgi-bnc.conf
> a2enconf serve-cgi-bnc.conf
That seems reasonable.
> nano /etc/apache2/sites-enabled/000-default-80.conf
> *** just before "</VirtualHost>"
> <Directory /var/www/html/bncweb>
> Options Indexes FollowSymLinks ExecCGI
> AddHandler cgi-script .cgi .pl
> AuthType Basic
> AuthName admin
> AuthUserFile /home/corpora/cqp/users/.htpasswd
> require valid-user
>
> SetEnv PERL5LIB /var/www/html/bncweb/lib_files
> SetEnv CORPUS_REGISTRY /usr/local/share/cwb/registry
> </Directory>
This should also be in serve-cgi-bnc.conf. Why are you including part of the BNCweb configuration in the default conf and part of it in a separate configuration file? And why are you setting PERL5LIB and CORPUS_REGISTRY redundantly in both? If all of this should run in a VirutalHost, then the serve-cgi-bnc.conf settings also have to be made for that VirtualHost.
> But now I get the following error:
> /usr/bin/perl: symbol lookup error: /usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/CL/CL.so: undefined symbol: central_corpus_directory
As I said above, the Perl module CL has been unsupported for at least a decade. It's called CWB::CL now. The module you're trying to use won't be compatible with any reasonably recent version of CWB.
Your BNCweb source code should have lines
use CWB::CQP;
use CWB::CL;
in lib_files/bncLibCQPXML.pm. If it doesn't, you need to upgrade to a more recent BNCweb distribution.
From your first e-mail:
> I tried:
> cpan[1]> install bncLibCQPXML
> Reading '/root/.cpan/Metadata'
> Database was generated on Fri, 02 Sep 2022 13:41:02 GMT
> Warning: Cannot install bncLibCQPXML, don't know what it is.
I think you worked out in the meantime that bncLibCQPXML (as well as a few other files) are local modules contained in the BNCweb distribution.
> when perl EncodeBNC.perl I have had to install a new CWB version...
> version too old, need at least v3.5.0 (CQP version 2.2.b99)
This is weird. The message appears to be from the CWB::CQP module, which indicates that you had already installed an up-to-date version of the Perl modules, probably from CPAN, and that the installation was successful. But at the same time, the installed module only finds CQP v2.2.b99, which has also been outdated for more than a decade …
The confusing thing is that during installation, the CWB/Perl packages must have found CWB v3.5.0, but then at runtime it's suddenly v2.2.b99. This suggests that your installation of the CWB is a bit messed up.
I suggests to start by uninstalling all versions of CWB from your computer with the instutils/uninstall-cwb.perl script from the cwb-3.5 source distribution. You can use "which cqp" to help you find out where versions of CWB have been installed.
Then install CWB v3.5 again – perhaps considering a standard install using the pre-compiled Deb or RPM package – and also re-install the Perl modules from CPAN for good measure.
What you didn't show is how you ended up installing the CL Perl module (rather than CWB::CL). However, these lines
> cd ../Perl-CWB-3.0/
> cd ../Perl-CWB-CQI-3.0/
> cd ../Perl-CWB-CL-3.0/
> cd ../Perl-CWB-Web-3.0/
suggest you might also have been using outdated versions of the Perl modules, as they are all at v3.5.0 on CPAN now.
Best & hope this helps,
Stephanie
More information about the CWB
mailing list