"Can't locate C4/Context.pm in @INC" and "read_config_file(/etc/koha.conf) returned undef" errors for rebuildnonmarc.pl
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@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@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
I forgot to mention, all the files are where they are supposed to be. (ie the koha.conf ) Its not missing. Of course, that would probably be a different error. On 6/16/06, h lowe <heidilowe@gmail.com> wrote:
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@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@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
On Fri, Jun 16, 2006 at 12:15:34PM -0400, h lowe said:
This is Heidi again, hi folks :)
Hi Heidi Heres how I would do it sudo perl -I /usr/local/koha/intranet/modules rebuildnonmarc.pl -c Chris -- Chris Cormack Programmer 027 4500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
Thanks! I tried it though and it wouldn't work :( So I added the use lib stuff to the scripts and saved them as new files just in case. Then I ran the new file and it worked! Only, sort of. The script ran, but nothing showed up in the opac or "items not issued report" so I took a closer look at the mysql database.. The new records have been loaded into the biblio table and the biblioitems table, but not the items table. ?? Has this happened to anyone else before? -Heidi On 6/16/06, Chris Cormack <chris@katipo.co.nz> wrote:
On Fri, Jun 16, 2006 at 12:15:34PM -0400, h lowe said:
This is Heidi again, hi folks :)
Hi Heidi
Heres how I would do it
sudo perl -I /usr/local/koha/intranet/modules rebuildnonmarc.pl -c
Chris -- Chris Cormack Programmer 027 4500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
participants (2)
-
Chris Cormack -
h lowe