[Koha] "Can't locate C4/Context.pm in @INC" and
"read_config_file(/etc/koha.conf) returned undef" errors for
rebuildnonmarc.pl
h lowe
heidilowe at gmail.com
Sat Jun 17 04:15:34 NZST 2006
This is Heidi again, hi folks :)
Here is my system, first off:
Server information
Koha version 2.2.5
OS version ('uname -a') Linux ubuntu 2.6.15-23-386 #1 PREEMPT Tue May
23 13:49:40 UTC 2006 i686 GNU/Linux
Perl version 5.008007
MySQL version mysql Ver 14.12 Distrib 5.0.21, for pc-linux-gnu (i486)
using readline 5.1
Apache version
I have been trying to run the rebuildnonmarc.pl script in preparation
for the import.
I first got this error.
subroot at ubuntu:/usr/local/koha/intranet/scripts/misc$ perl
rebuildnonmarc.plCan't locate C4/Context.pm in @INC (@INC contains:
/etc/perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl .) at rebuildnonmarc.pl line 10.
BEGIN failed--compilation aborted at rebuildnonmarc.pl line 10.
After many tries at the syntax, i finally figured out the command to
export the variables:
subroot at ubuntu:/usr/local/koha/intranet/scripts/misc$ perl
rebuildnonmarc.pl export PERL5LIB="/usr/local/koha/intranet/modules"
export KOHA_CONF="/etc" read_config_file(/etc/koha.conf) returned
undef at /usr/local/koha/intranet/modules/C4/Context.pm line 229.
read_config_file(/etc/koha.conf) returned undef at
/usr/local/koha/intranet/modules/C4/Context.pm line 229.
This script rebuilds the non-MARC DB from the MARC values.
You can/must use it when you change your mapping.
For example : you decide to map biblio.title to 200 (it was previously
mapped to 610) : run this script or you will have strange
results in OPAC !
syntax :
./rebuildnonmarc.pl -h (or without arguments => shows this screen)
./rebuildnonmarc.pl -c (c like confirm => rebuild non marc DB
(may be long)
-t => test only, change nothing in DB
Died at rebuildnonmarc.pl line 35.
So I had a different error! Yay!
But then today I tried to run the script again under sudo (I figured
maybe I didn't have permission to read koha.conf) and got "Can't
locate C4/Context.pm in @INC..." again. Then I tried to run it again,
entered exactly as i did yesterday (see 2nd error) and I still got the
@INC business.
I am stuck. does anyone have a tip on this?
Thank you much,
Heidi Lowe
More information about the Koha
mailing list