g95 ld: cannot find crt1.o: No such file or directory

i downloaded the  g95 tar package, run tar -xvf g95*

and then sudo ln -s $PWD/g95-install/bin/*g95* /bin/g95
it's ok when running g95 -v to check the version
but i ran into trouble when i tried to compile fortran source file with g95

which is

ld: cannot find crt1.o: No such file or directory

ld: cannot find crti.o: No such file or directory

luckily,i found a solution in this webside

just run sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64

finally i can compile fortran source file with g95!

原文地址:https://www.cnblogs.com/zhanchao/p/7508893.html