You should find out where the cernlib libraries are located on your machine … if they are …
what kind of machine are you using ?
Note that cernlib is frozen for years right now, and not supported anymore.
If your program is not to big can you post it here to see how it looks like ?