Monday, June 14, 2010

I don't have permission to install a Perl module on the system!

     I was trying to install a perl module lately and I got through this error. I was trying to install Math:Combinatorials

robern@robern-laptop:/media/EE6A5C156A5BD8C3/Users/ROBERN/Desktop/iiit/LTRC_work/math_combinatory_perl/Math-Combinatorics-0.09$ make install
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/local/man/man3'
mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.10/ExtUtils/Install.pm line 479

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1
make: *** [pure_site_install] Error 13

If you don't have root permission you will not be able to install a module in the usual place on a shared user system. If you do not have root access you may get errors like:

 This is easy to get around. You just install it locally in your home directory. Make a directory called say /lib in your home directory like this:

# first navigate to your home directory
$ cd ~

# now make a directory called lib
# on UNIX
$ mkdir lib
# on Win32
C:\> md lib

Now you have a directory called ~/lib where the ~ represents the path to your home dir. ~ literally means your home dir but you knew that already. All you need to do is add a modifier to your perl Makefile.PL command

$ perl Makefile.PL PREFIX=~/lib LIB=~/lib

This tell MakeMaker to install the files in the lib directory in your home directory. You then just make/nmake as ::

$ make
$ make test
$ make install

    To use the module you just need to add ~/lib to @INC. See Simple Module Tutorial for full details of how. In a nutshell the top of your scripts will look like this:

#!/usr/bin/perl -w
use strict;
# add your ~/lib dir to @INC
use lib '/usr/home/your_home_dir/lib/';
# proceed as usual
use Some::Module;

Sunday, June 13, 2010

Caffeine : The new Search Indexing system of Google

All people who have worked or read about search engines must be pretty aware of the fact that indexing is a pretty tedious job to be done and plays a central role. At research level we generally use libraries like Beautiful Soup for indexing. But the need for a faster indexing is felt for pages which get constantly updated. Therefore search engines usually identify such pages. Web pages such as news, share markets page, etc need to be constantly updated . So these pages are crawled more oftenly as compared to other pages.
      The introduction of Caffine produces a whole different approach and promises to keep all the web pages updated. A parallel processing approach is taken and hundreds of thousands of pages are crawled every second. This leads to a fresher return of query. "Caffeine takes up nearly 100 million gigabytes of storage in one database and adds new information at a rate of hundreds of thousands of gigabytes per day".
Our old index had several layers, some of which were refreshed at a faster rate than others; the main layer would update every couple of weeks. To refresh a layer of the old index, we would analyze the entire web, which meant there was a significant delay between when we found a page and made it available to you.

With Caffeine, we analyze the web in small portions and update our search index on a continuous basis, globally. As we find new pages, or new information on existing pages, we can add these straight to the index. That means you can find fresher information than ever before—no matter when or where it was published.s.
The image compares the old search indexing and the new one: Caffine