Installation

Iterator

Iterator

by Hedley Pinsent -
Number of replies: 5
This involves a fresh install on my laptop (for development purposes)
Ubuntu 12.10 - uses manual "Installation Manual for 2.5 on Ubuntu 12.04"

When I click on "course administration" I get an error involving "Iterator.pm"

reviewed cpan as below
hp


cpan[1]> install Iterator
Reading '/root/.cpan/Metadata'
Database was generated on Mon, 12 Nov 2012 20:07:03 GMT
Iterator is up to date (0.03).

cpan[2]> exit
Lockfile removed.
root@corei5:/home/hedley# exit
exit
hedley@corei5:~$ perl -MIterator -e 'print "installed\n"'
Can't locate Iterator.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .).
BEGIN failed--compilation aborted.
hedley@corei5:~$ ^C
hedley@corei5:~$


In reply to Hedley Pinsent

Re: Iterator

by Michael Gage -
When this has happened to me it's because cpan is installing Iterator.pm in some library that isn't searched by the perl used by Apache.  For example
the perl library above seems to be 5.14.2 and perhaps perl has a different version number.  

I'm not experienced enough to know a clean way to fix this.  I tend to fiddle with the install until I can get it to install in the correct directory.  Sometimes I move the file manually although there is no guarantee that will work. 

Any perl monks out there? What is the official fix?
In reply to Hedley Pinsent

Re: Iterator

by Jason Aubrey -
Hedley,

Maybe try this. Do:

$ locate Iterator.pm

That will at least tell you where the module was installed to. Then in the <Perl></Perl> section of webwork.apache2.config you can add

foreach(@INC) {
warn $_."\n";
}


that should tell you where apache is looking for perl modules when you start up webwork.

Jason

In reply to Jason Aubrey

Re: Iterator

by Jason Aubrey -
Oh, and btw, running webwork2/bin/check_modules.pl apache2 will tell you both the contents of @INC and all missing dependencies.

Jason
In reply to Jason Aubrey

Re: Iterator

by Hedley Pinsent -
Well thank you all; although I have graduated to new problems!

Anyway I now have a few extra copies of the file floating around.

What I did was to read the computer. When apache generated the error message it told me what was missing Iterator/Util.pm (I guess, by this time it was finding the Iterator.pm) and where it was looking /opt/webwork/pg/lib (amongst many other places).

It seems it needs (what it was looking for) which was an "Iterator" directory with "Util.pm" in it. It seems that the file itself was not sufficient and that it had to be included in an "Iterator" directory

Thanks again - hp
In reply to Hedley Pinsent

Re: Iterator

by Hedley Pinsent -
I went back and did a complete re-install.
The first time: there were a few things missed.
The second time: no glitches at all; not even Iterator

Thanks again
hp

ps: The machine is a modern asus core i5. I had also tried installing the live dvd (ubuntu 10.04). Although this is how I started, working well on an older dual-core, it did not have driver support for the laptop (no internet). It was throwing me back into time [ windows wrappers for (ndis??) for my hardware drivers - etc]

There will certainly be a place for the newer ubuntu 12.04 live DVD version when it comes out.

hp