in reply to (OT) installing cairo library

I suggest you try the cairo mailing list, since this has nothing to do with perl.

http://lists.cairographics.org/archives/cairo/

this entry may or may not help

Update: in case you're using sun's compiler; you may want to try using gcc instead. Other than that, ask the guys at the mailing list. They should know.