[rt-users] rt-3.8.1 cannot get ExternalAuth.pm to be recognized in perl's @inc list

Calvin Chiang calvin at utilyx.com
Wed Dec 10 09:25:32 EST 2008


Hi All,

ok. this problem is really annoying me.

I've been following some excellent install instructions from here:
http://wiki.bestpractical.com/view/Ubuntu_8.04.1

on how to install rt-3.8.1 on ubuntu 8.04.

All good down to the bit on initalizing the database.

At the end of the intialization i get the error:

calvinc at UbuntuBase804Small:~/tmp/rt-3.8.1$ sudo make initialize-database
/usr/bin/perl sbin/rt-setup-database --action init --dba root 
--prompt-for-dba-password
In order to create or update your RT database, this script needs to 
connect to your  mysql instance on localhost as root
Please specify that user's database password below. If the user has no 
database
password, just press return.

Password:
Working with:
Type:    mysql
Host:    localhost
Name:    rt3
User:    rt_user
DBA:    root
Now creating a mysql database rt3 for RT.
Done.
Now populating database schema.
Done.
Now inserting database ACLs
Granting access to rt_user@'localhost' on rt3.
Done.
Now inserting RT core system objects
Done.
[Wed Dec 10 13:58:03 2008] [crit]: Can't locate 
RT/Authen/ExternalAuth.pm in @INC (@INC contains: 
/home/calvinc/tmp/rt-3.8.1/sbin/../local/lib 
/home/calvinc/tmp/rt-3.8.1/sbin/../lib /etc/perl 
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 
/usr/local/lib/site_perl .) at 
/home/calvinc/tmp/rt-3.8.1/sbin/../lib/RT.pm line 624. 
(/home/calvinc/tmp/rt-3.8.1/sbin/../lib/RT.pm:377)
Can't locate RT/Authen/ExternalAuth.pm in @INC (@INC contains: 
/home/calvinc/tmp/rt-3.8.1/sbin/../local/lib 
/home/calvinc/tmp/rt-3.8.1/sbin/../lib /etc/perl 
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 
/usr/local/lib/site_perl .) at 
/home/calvinc/tmp/rt-3.8.1/sbin/../lib/RT.pm line 624.
make: *** [initialize-database] Error 255

So the first time around, i thought that maybe i'd better install the 
ExernalAuth.pm plugin. so i followed the instructions and got the 
following success message:

calvinc at UbuntuBase804Small:~/tmp/RT-Authen-ExternalAuth-0.06_02$ sudo 
make install
Installing 
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/User_Vendor.pm
Installing 
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm
Installing /opt/rt3/local/man/man3/RT::User_Vendor.3pm
Installing /opt/rt3/local/man/man3/RT::Authen::ExternalAuth.3pm
Writing /opt/rt3/local/man/auto/RT/Authen/ExternalAuth/.packlist
Appending installation info to 
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/perllocal.pod
Installing 
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/etc/RT_SiteConfig.pm
Installing 
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/html/Callbacks/ExternalAuth/autohandler/Auth

So then i deleted the database reran make initialize-database. but got 
the same problem.


So after a while i decided it was a problem with the @INC list. after 
some digging around, i thought i'd add the full path to ExternalAuth.pm 
to the PERL5LIB variable, which would add then add it to @INC

export PERL5LIB=/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen

after i do that i check @INC using

perl -V

and i get

Built under linux
  Compiled at Nov 27 2007 10:44:36
  %ENV:
    PERL5LIB="/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/"
  @INC:
    /opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/
    /etc/perl
    /usr/local/lib/perl/5.8.8
    /usr/local/share/perl/5.8.8
    /usr/lib/perl5
    /usr/share/perl5
    /usr/lib/perl/5.8
    /usr/share/perl/5.8
    /usr/local/lib/site_perl

yet when i delete the database and retry
sudo make initialize-database

i the list of paths within @INC displays the same as the first time - it 
still cant find ExternalAuth.pm


strangely,.. when i try to do a make initialize-database with out the 
sudo i get:

calvinc at UbuntuBase804Small:~/tmp/rt-3.8.1$ make initialize-database
/usr/bin/perl sbin/rt-setup-database --action init --dba root 
--prompt-for-dba-password

RT couldn't load RT config file /opt/rt3/etc/RT_Config.pm as:
    user: calvinc
    group: calvinc

The file is owned by user root and group www-data. 

This usually means that the user/group your webserver is running
as cannot read the file.  Be careful not to make the permissions
on this file too liberal, because it contains database passwords.
You may need to put the webserver user in the appropriate group
(www-data) or change permissions be able to run succesfully.

Can't locate RT_Config.pm in @INC (@INC contains: /opt/rt3/local/etc 
/opt/rt3/etc /home/calvinc/tmp/rt-3.8.1/sbin/../local/lib 
/home/calvinc/tmp/rt-3.8.1/sbin/../lib 
/opt/rt3/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ /etc/perl 
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 
/usr/local/lib/site_perl .) at 
/home/calvinc/tmp/rt-3.8.1/sbin/../lib/RT/Config.pm line 410.
BEGIN failed--compilation aborted at sbin/rt-setup-database line 86.
make: *** [initialize-database] Error 255


which shows the correct path added into @INC here?!!!

....

i'm sure it's something i've done/overlooked cos it always is.. but i 
just cant see it.
any hints much appreciated!

-- 
Calvin Chiang
Network Admin
Utilyx
1st Floor, 55 North Wharf Road
Paddington
London, W2 1LA
Tel: 020 7087 8673
www.utilyx.com


______________________________________________________________________
"Utilyx" is the trading name of "Utilyx Limited" and "Utilyx Risk Management Limited" (URML). URML is authorised and regulated by the Financial Services Authority (FSA). This message contains information that may be privileged or confidential and is the property of Utilyx. It is intended only for the person to whom it is addressed. No confidentiality or privilege is waived or lost by any mistransmission. Any views or opinions expressed in this message are solely those of the author and do not necessarily represent those of Utilyx. Unless otherwise stated, any pricing information given in this message is indicative only and does not constitute an offer to deal at any price quoted. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



More information about the rt-users mailing list