vikram_147@yahoo.com (Vikram) writes:
> (bash#)gcc -I/usr/include/pgsql sirisha_retrieve.c -o output2 -lpq
> /usr/bin/ld: cannot open output file output2: Permission denied
> collect2: ld returned 1 exit status
> What does the above message signify?
It sure looks like you're doing this in a directory that you don't have
write permission for.
A less-probable alternative is that output2 already exists in your
current directory and you don't have write permission to overwrite it.
regards, tom lane