MINGW gfortran error: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lgcc

MINGW gfortran error: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lgcc

在笔记本电脑上安装 MINGW 编译 Fortran,运行 出现此错误。

简单程序:

program hello
    implicit none
    
    print *, 'Hello from FORTRAN!'
end program hello

编译命令:

gfortran hello.f90 -o hello

错误:

c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lgcc_s
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lgcc
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lquadmath
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lgcc_s
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lgcc
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lgcc_s
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lgcc
collect2.exe: error: ld returned 1 exit status

我使用 MinGW 安装管理器安装的包是

我在管理器中寻找了包含这些文件的其他包,但我不确定它们在哪里,所以我可以安装它们。有什么想法吗?

针对 的评论中的每位用户 Emilio,重新启动解决了该问题。