Installing Net::LDAP for Perl, on Windows

A short how-to for installing Perl in Windows, using the Cygwin suite. Written by Michael Donnelly, updated Sept 2010

Download cygwin from http://www.cygwin.com

Run Cygwin Setup, and select the following packages

After installing the packages above plus any dependencies, restart your windows system.

The cygwin setup installs the cygwin posix DLL, as well as the SSH daemon service. Sometimes the reboot is necessary for the DLLs to start working correctly. But also, the reboot is to ensure that the SSH service starts automatically on reboot.

Launch Cygwin shell from the desktop, and run the following commands to allow remote SSH access:

# ssh-host-config
Enter yes when prompted for privilege separation
# net start "cygwin sshd"
You can now SSH in to the windows box, performing all remaining work remotely.
Enter the following commands to build a full version of Net::LDAP

NOTE: The version numbers below may not be the most current, check in each case.
The versions listed below have been tested and are known to work together with Cygwin 1.7.7.

cd /usr/src/openssl* && ./config && make && make install && cd .. && echo Install Done

# Check version at http://search.cpan.org/perldoc?Net::SSLeay
wget -c http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/Net-SSLeay-1.35.tar.gz
tar zxvf Net-SSLeay-*.tar.gz
cd Net-SSLeay-*
perl Makefile.pl && make && make install && cd .. && echo Done

# Check version at http://search.cpan.org/perldoc?IO::Socket::SSL
wget -c http://search.cpan.org/CPAN/authors/id/S/SU/SULLR/IO-Socket-SSL-1.33.tar.gz
tar zxvf IO-Socket-SSL-*.tar.gz
cd IO-Socket-SSL-*
perl Makefile.pl && make && make install && cd .. && echo Install Done

# Check version at http://search.cpan.org/perldoc?Convert::ASN1
wget -c http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Convert-ASN1-0.22.tar.gz
tar zxvf Convert-ASN1-*.tar.gz
cd Convert-ASN1-*
perl Makefile.pl && make && make install && cd .. && echo Install Done

# Check version at http://search.cpan.org/perldoc?Authen::SASL
wget -c http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Authen-SASL-2.15.tar.gz
tar zxvf Authen-SASL-*.tar.gz
cd Authen-SASL-*
perl Makefile.pl && make && make install && cd .. && echo Install Done

# Check version at http://search.cpan.org/perldoc?URI
wget -c http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/URI-1.55.tar.gz
tar zxvf URI-*.tar.gz
cd URI-*
perl Makefile.pl && make && make install && cd .. && echo Install Done

# Check version at http://search.cpan.org/perldoc?XML::NamespaceSupport
wget -c http://search.cpan.org/CPAN/authors/id/P/PE/PERIGRIN/XML-NamespaceSupport-1.11.tar.gz
tar zxvf XML-NamespaceSupport-*.tar.gz
cd XML-NamespaceSupport-*
perl Makefile.pl && make && make install && cd .. && echo Install Done

# Check version at http://search.cpan.org/perldoc?XML::SAX
wget -c http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/XML-SAX-0.96.tar.gz
tar zxvf XML-SAX-*.tar.gz
cd XML-SAX-*
perl Makefile.pl && make && make install && cd .. && echo Install Done

# Now, ready at last for Net::LDAP
# Check version at http://search.cpan.org/perldoc?Net::LDAP
wget -c http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/perl-ldap-0.4001.tar.gz
tar zxvf perl-ldap-*.tar.gz
cd perl-ldap-*
perl Makefile.pl && make && make install && cd .. && echo Install Done

# Check version at http://search.cpan.org/perldoc?MIME::Base64
wget -c http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/MIME-Base64-3.09.tar.gz
tar zxvf MIME-Base64-*.tar.gz 
cd MIME-Base64-*
perl Makefile.pl && make && make install && cd .. && echo Install Done

# Check version at http://search.cpan.org/perldoc?Text::CSV
wget -c http://search.cpan.org/CPAN/authors/id/M/MA/MAKAMAKA/Text-CSV-1.18.tar.gz
tar zxf Text-CSV-*.tar.gz 
cd Text-CSV-*
perl Makefile.pl && make && make install && cd .. && echo Install Done

Congratulations! Perl and Net::LDAP are now installed and ready to go.