LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-06-2005, 09:09 PM   #1
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
webmin - LDAP


hi there i'm looking into LDAP but whenever i go into webmin's 'LDAP Users and Groups' module i see this

The Net::LDAP Perl module that this module requires is not installed or is not working properly. Click here to have it downloaded and installed now.

The error reported by Perl when trying to load the module was :

Can't locate Net/LDAP.pm in @INC (@INC contains: /install/webmin-1.170/useradmin /install/webmin-1.170 /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at (eval 7) line 2.
BEGIN failed--compilation aborted at (eval 7) line 2.

and when i click to download it i get this.

Install Module




--------------------------------------------------------------------------------

Failed to install module : Module Net::LDAP was not found in the CPAN modules list


--------------------------------------------------------------------------------

Return to modules list

i'm running RHEL 3.
 
Old 06-06-2005, 11:09 PM   #2
king_nothingzzz
Member
 
Registered: Aug 2003
Location: Brisbane, Australia
Distribution: Red Hat Enterprise Linux 4
Posts: 120

Rep: Reputation: 15
Hey mate...

The cowboys doing pretty good, eh!!

perl looks in directories listed in @INC

Try
Code:
perl -e 'print "\@INC is @INC\n";'
to know where perl is seeing

You may have to modify the module search path.

As far as i can tell, it has got nothing to do with webmin, but with perl.

This is as far as i know, tell me the output of the code, then i will try and advice further

Cheers

king_nothingzzz
 
Old 06-07-2005, 01:11 AM   #3
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Original Poster
Rep: Reputation: 30
yea, were getting ready to beat the bronco's next time!

this is the out put of the last command


[root@redhat install]# perl -e 'print "\@INC is @INC\n";'
@INC is /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .

Last edited by paul_mat; 06-07-2005 at 02:16 AM.
 
Old 06-07-2005, 06:01 PM   #4
king_nothingzzz
Member
 
Registered: Aug 2003
Location: Brisbane, Australia
Distribution: Red Hat Enterprise Linux 4
Posts: 120

Rep: Reputation: 15
Lets see about that mate, broncos havent lost a single game in a loong time...
Neways, looking forward to thrashing the blues in the origin match next wednesday..

Coming to the problem on hand, Well, looks fine to me...

As i told before, i dont know much about this issue, it looks like a perl issue and the @INC looks fine...

Now, i did some googling and found a perl script that can solve the problem to some extent...

try this script...all it does is search for the modules and also install it...

Hopefully it will be alright

Code:
# check_perl_modules.pl - This script checks installed and required Perl modules
# It also does the required installations
# RCS Identication ; $Revision: 1.27 $ ; $Date: 2004/02/27 14:56:31 $ 
#
# Sympa - SYsteme de Multi-Postage Automatique
# Copyright (c) 1997, 1998, 1999, 2000, 2001 Comite Reseau des Universites
# Copyright (c) 1997,1998, 1999 Institut Pasteur & Christophe Wolfhugel
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

use CPAN;

## assume version = 1.0 if not specified.
## 
%versions = ('perl' => '5.005',
             'Net::LDAP' =>, '0.27', 
	     'perl-ldap' => '0.10',
	     'Mail::Internet' => '1.51', 
	     'DBI' => '1.06',
	     'DBD::Pg' => '0.90',
	     'DBD::Sybase' => '0.90',
	     'DBD::mysql' => '2.0407',
	     'FCGI' => '0.48',
	     'MIME::Tools' => '5.209',
	     'File::Spec' => '0.8',
             'Crypt::CipherSaber' => '0.50',
	     'CGI' => '2.52',
	     'Digest::MD5' => '2.00',
	     'DB_File' => '1.75',
	     'IO::Socket::SSL' => '0.90',
	     'Net::SSLeay' => '1.16',
	     'Archive::Zip' => '1.05',
	     'Bundle::LWP' => '1.09',
	     'SOAP::Lite' => '0.60'
	     );

### key:left "module" used by SYMPA, 
### right CPAN module.		     
%req_CPAN = ('DB_File' => 'DB_FILE',
	     'Digest::MD5' => 'Digest-MD5',
	     'Mail::Internet' =>, 'MailTools',
	     'IO::Scalar' => 'IO-stringy',
	     'MIME::Tools' => 'MIME-tools',
	     'MIME::Base64' => 'MIME-Base64',
	     'CGI' => 'CGI',
	     'File::Spec' => 'File-Spec',
	     'Archive::Zip' => 'Archive-Zip',
	     );

%opt_CPAN = ('DBI' => 'DBI',
	     'DBD::mysql' => 'Msql-Mysql-modules',
	     'DBD::Pg' => 'DBD-Pg',
	     'DBD::Oracle' => 'DBD-Oracle',
	     'DBD::Sybase' => 'DBD-Sybase',
	     'Net::LDAP' =>   'perl-ldap',
	     'CGI::Fast' => 'CGI',
             'Crypt::CipherSaber' => 'CipherSaber',
	     'FCGI' => 'FCGI',
	     'Net::SMTP' => 'libnet',
	     'IO::Socket::SSL' => 'IO-Socket-SSL',
	     'Net::SSLeay' => 'NET-SSLeay',
	     'Bundle::LWP' => 'LWP',
	     'SOAP::Lite' => 'SOAP-Lite');

%opt_features = ('DBI' => 'a generic Database Driver, required by Sympa to access Subscriber information and User preferences. An additional Database Driver is required for each database type you wish to connect to.',
		 'DBD::mysql' => 'Mysql database driver, required if you connect to a Mysql database.\nYou first need to install the Mysql server and have it started before installing the Perl DBD module.',
		 'DBD::Pg' => 'PostgreSQL database driver, required if you connect to a PostgreSQL database.',
		 'DBD::Oracle' => 'Oracle database driver, required if you connect to a Oracle database.',
		 'DBD::Sybase' => 'Sybase database driver, required if you connect to a Sybase database.',
		 'Net::LDAP' =>   'required to query LDAP directories. Sympa can do LDAP-based authentication ; it can also build mailing lists with LDAP-extracted members.',
		 'CGI::Fast' => 'WWSympa, Sympa\'s web interface can run as a FastCGI (ie: a persistent CGI). If you install this module, you will also need to install the associated mod_fastcgi for Apache.',
		 'Crypt::CipherSaber' => 'this module provides reversible encryption of user passwords in the database.',
		 'Archive::Zip ' => 'this module provides zip/unzip for archive and shared document download/upload',
		 'FCGI' => 'WSympa, Sympa\'s web interface can run as a FastCGI (ie: a persistent CGI). If you install this module, you will also need to install the associated mod_fastcgi for Apache.',
		 'Net::SMTP' => 'this is required if you set \'list_check_smtp\' sympa.conf parameter, used to check existing aliases before mailing list creation.',
		 'IO::Socket::SSL' => 'required by CAS (single sign-on) and the \'include_remote_sympa_list\' feature that includes members of a list on a remote server, using X509 authentication',
		 'Net::SSLeay' => 'required by the \'include_remote_sympa_list\' feature that includes members of a list on a remote server, using X509 authentication',
		 'Bundle::LWP' => 'required by the \'include_remote_sympa_list\' feature that includes members of a list on a remote server, using X509 authentication',
		 'SOAP::Lite' => 'required if you want to run the Sympa SOAP server that provides ML services via a "web service"');

### main:
print "******* Check perl for SYMPA ********\n";
### REQ perl version
print "\nChecking for PERL version:\n-----------------------------\n";
$rpv = $versions{"perl"};
if ($] ge $versions{"perl"}){
    print "your version of perl is OK ($]  >= $rpv)\n";
}else {
    print "Your version of perl is TOO OLD ($]  < $rpv)\nPlease INSTALL a new one !\n";
}

print "\nChecking for REQUIRED modules:\n------------------------------------------\n";
&check_modules('y', %req_CPAN);
print "\nChecking for OPTIONAL modules:\n------------------------------------------\n";
&check_modules('n', %opt_CPAN);

print <<EOM;
******* NOTE *******
You can retrive all theses modules from any CPAN server
(for example <a href="ftp://ftp.pasteur.fr/pub/computing/CPAN/CPAN.html">ftp://ftp.pasteur.fr/pub/computing/CPAN/CPAN.html</a>)
EOM
###--------------------------
# reports modules status
###--------------------------
sub check_modules {
    my($default, %todo) = @_;
    my($vs, $v, $rv, $status);

    print "perl module          from CPAN       STATUS\n"; 
    print "-----------          ---------       ------\n";

    foreach $mod (sort keys %todo) {
	printf ("%-20s %-15s", $mod, $todo{$mod});
	$status = &test_module($mod);
	if ($status == 1) {
	    $vs = "$mod" . "::VERSION";
	    $v = $$vs;
	    $rv = $versions{$mod} || "1.0" ;
	    ### OK: check version
	    if ($v ge $rv) {
		printf ("OK (%-6s >= %s)\n", $v, $rv);
		next;
	    }else {
		print "version is too old ($v < $rv).\n";
                print ">>>>>>> You must update \"$todo{$mod}\" to version \"$versions{$todo{$mod}}\" <<<<<<.\n";
		&install_module($mod, $default);
	    }
	} elsif ($status eq "nofile") {
	    ### not installed
	    print "was not found on this system.\n";

	    &install_module($mod, $default);

	} elsif ($status eq "pb_retval") {
	    ### doesn't return 1;
	    print "$mod doesn't return 1 (check it).\n";
	} else {
	    print "$status\n";
	}
    }
}

##----------------------
# Install a CPAN module
##----------------------
sub install_module {
    my ($module, $default) = @_;

    unless ($ENV{'FTP_PASSIVE'} eq 1) {
	$ENV{'FTP_PASSIVE'} = 1;
	print "Setting FTP Passive mode\n";
    }

    ## This is required on RedHat 9 for DBD::mysql installation
    my $lang = $ENV{'LANG'};
    $ENV{'LANG'} = 'C' if ($ENV{'LANG'} eq 'en_US.UTF-8');

    unless ($> == 0) {
	print "\#\# You need root privileges to install $module module. \#\#\n";
	print "\#\# Press the Enter key to continue checking modules. \#\#\n";
	my $t = <STDIN>;
	return undef;
    }

    printf "Description: %s\n", $opt_features{$module};
    print "Install module $module ? [$default]";
    my $answer = <STDIN>; chomp $answer;
    $answer ||= $default;
    next unless ($answer =~ /^y$/i);
  CPAN::Shell->conf('inactivity_timeout', 4);
    CPAN::Shell->install($module);

    ## Restore lang
    $ENV{'LANG'} = $lang if (defined $lang);

}

###--------------------------
# test if module is there
# (from man perlfunc ...)
###--------------------------
sub test_module {
    my($filename) = @_;
    my($realfilename, $result);

    $filename =~ s/::/\//g;
    $filename .= ".pm";
    return 1 if $INC{$filename};
    
  ITER: {
      foreach $prefix (@INC) {
	  $realfilename = "$prefix/$filename";
	  if (-f $realfilename) {
	      $result = do $realfilename;
	      last ITER;
	  }
      }
      return "nofile";
  }
    return "pb_retval" unless $result;
    return $result;
}
### EOF
The script can be found here -->http://66.102.7.104/search?q=cache:K...les+list&hl=en

and CPAN certainly has the module in question....you can see the result yourself on cpan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LDAP: Can't contact master ldap server rulirahm Linux - Networking 2 07-14-2014 03:02 AM
LDAP server not starting as user LDAP klnasveschuk Fedora 1 02-15-2007 05:49 AM
webmin troubles - Failed to write to /etc/webmin/module.infos.cache : No space left o coal-fire-ice Linux - Software 1 07-28-2005 11:08 AM
webmin/ldap issues labratmatt Linux - Software 0 01-17-2005 11:20 PM
ldap-abook unable to get street name in ldap-entry Jingle Linux - Software 1 06-06-2004 08:13 PM


All times are GMT -5. The time now is 04:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration