Wednesday, July 13, 2011

Perl Upgrade in Mac

Upgrading perl :

perl -MCPAN -e shell 
cpan> install MD5 
cpan> install CPAN 
cpan> reload cpan 
cpan> q

cd /usr/local/src/ 
curl http://www.cpan.org/src/stable.tar.gz -o stable.tar.gz

gunzip stable.tar.gz tar
xvf stable.tar 
cd perl-5.8.0
./Configure -de 
make && make test 
make install
Note :
If in case any of the commands dont work.. just type the same command with prefix as 'sudo'

for examples.. if the first command,
perl -MCPAN -e shell
 does not work, then type it as
sudo perl -MCPAN -e shell
Installing extra perl modules :
  1. Even after install, if some of the modules are missing in perl, YOu need to install them in mac using the cpan utility as below :
    • browse to the perl install location, most often this location is usr/bin/perl by default. This location can also be modified during installation.
    • Type in >> ./cpan
    • >>install <> ..... For examples, if the module is XMP::Parser which is throwing error.. then, it would be, >> install XML::Parser
    • type yes. enter
    • again type yes. enter
2. Now, set perl from Preferences in eclipse to the installed location. In my above case, browse to usr/bin/perl

Now the module missing error would vanish.

************************************************************

Monday, July 4, 2011

Resetting Admin password in MacMini

This method is by using the install CD.

  • Restart the system with the cd for installation in the system.
  • Proceed with the installation until you see a toolbar appearing on the screen along with the install wizard.
  • Select "Utilities" menu from the toolbar and reset the password over there.
  • Now cancel the installation. This will prompt for system restart.
  • Restart on promt and login with your neww password.