this error is occurring:
checking whether the C compiler works… no
configure: error: in `/Users/ahmadtashfeen/Developer/postgresql-11.17′:
configure: error: C compiler cannot create executables
See `config.log’ for more details
I checked if I have gcc installed and I had, so it isn’t making any sense to me.
2
Answers
Firstly, make sure you have the command line tools already installed. If you haven’t, run:
Apple shifted from gcc to clang as the default C compiler a while back. So, first check if you have gcc installed separately. In the command line, run:
Also make sure, that your environment variable Path to the compiler is correctly set.
If all the above are already satisfied, try reinstalling gcc using Homebrew package manager.
Check that gcc is on the global path or not. It might be that it is not being recognized in that specific folder.
If it’s not on the path, you can edit it manually. The process varies with OS but for mac, you have to achieve this task using terminal.