To locate the file, type "locate libpq.so.2.1" at a command prompt; "locate" is your friend, and can take wildcards
I'm not sure about PG 6, but in PG7, you need to make a symlink from libpq.so.2.0 to libpq.so.2.1. Don's Postgres installation notes mention this. BTW, I recommend you use PG7 instead of 6.x. There are bigger improvements/differences than the 0.5 version increment implies.