I\'m trying to compile a test file:
gcc -o test test.c -lg2c
but I get the error:
/usr/bin/ld: cannot find -lg2c
Create a new folder inside your home directory (not root directory!).
Copy all the required library associated with -lg2c
from /usr/lib/gcc/x86_64-redhat-linux/3.4.6
to this folder.
Set the path in your bash profile to this new folder.
I also got this issue, and solve it with this workaround.
Perhaps we (as non-root users) don't have the necessary access/right to /usr/lib/gcc/x86_64-redhat-linux/3.4.6