./configure 并在 macOS 上出问题

./configure and make problems on macOS

我正在尝试获取 QuantumEspresso

我下载了,进入文件夹试试

./configure

但出现错误

(base) localhost:q-e myname$ ./configure
checking build system type... x86_64-apple-darwin18.6.0
checking ARCH... mac686
checking setting AR... ... /anaconda3/bin/x86_64-apple-darwin13.4.0-ar
checking setting ARFLAGS... ... ruv
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgfortran... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking for nagfor... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking whether the Fortran compiler works... no
configure: error: in `/Users/myname/Documents/QuantumEspresso/new_folder/q-e':
configure: error: Fortran compiler cannot create executables
See `config.log' for more details

显然,我没有像 gfortran 这样的部分。我从哪里获得 MAC 的缺失部分?

  1. 安装 Homebrew 包管理器。
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. 使用 Homebrew 安装 gcc(包括 gfortran
brew install gcc