![为什么 Ubuntu 不让我安装 fftw-2.1.5 — 我收到错误“214:目标‘install-recursive’的配方失败”](https://linux22.com/image/921072/%E4%B8%BA%E4%BB%80%E4%B9%88%20Ubuntu%20%E4%B8%8D%E8%AE%A9%E6%88%91%E5%AE%89%E8%A3%85%20fftw-2.1.5%20%E2%80%94%20%E6%88%91%E6%94%B6%E5%88%B0%E9%94%99%E8%AF%AF%E2%80%9C214%EF%BC%9A%E7%9B%AE%E6%A0%87%E2%80%98install-recursive%E2%80%99%E7%9A%84%E9%85%8D%E6%96%B9%E5%A4%B1%E8%B4%A5%E2%80%9D.png)
当我尝试在 ubuntu 的终端中运行该make install
命令时,出现以下错误。我无法安装任何更高版本,因为我正在运行名为 GADGET2 的旧代码。
Making install in fftw
make[1]: Entering directory '/home/webb/Documents/fftw-2.1.5/fftw'
make[2]: Entering directory '/home/webb/Documents/fftw-2.1.5/fftw'
/bin/bash ../mkinstalldirs /usr/local/lib
/bin/bash ../libtool --mode=install /usr/bin/install -c libfftw.la /usr/local/lib/libfftw.la
/usr/bin/install -c .libs/libfftw.lai /usr/local/lib/libfftw.la
/usr/bin/install: cannot create regular file '/usr/local/lib/libfftw.la': Permission denied
Makefile:297: recipe for target 'install-libLTLIBRARIES' failed
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory '/home/webb/Documents/fftw-2.1.5/fftw'
Makefile:568: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/webb/Documents/fftw-2.1.5/fftw'
Makefile:214: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
我现在收到错误
PEPREFIX_FFTW -I/usr/common/pdsoft/include -I/usr/local/include -c -o longrange.o longrange.c
mpicc main.o run.o predict.o begrun.o endrun.o global.o timestep.o init.o restart.o io.o accel.o read_ic.o ngb.o system.o allocate.o density.o gravtree.o hydra.o driftfac.o domain.o allvars.o potential.o forcetree.o peano.o gravtree_forcetest.o pm_periodic.o pm_nonperiodic.o longrange.o -g -L/usr/common/pdsoft/lib -Wl,"-R /usr/common/pdsoft/lib" -lgsl -lgslcblas -lm -L/usr/local/lib -lrfftw_mpi -lfftw_mpi -lrfftw -lfftw -o Gadget2
/usr/bin/ld: cannot find -lrfftw_mpi
/usr/bin/ld: cannot find -lfftw_mpi
collect2: error: ld returned 1 exit status
Makefile:242: recipe for target 'Gadget2' failed
make: *** [Gadget2] Error 1
修复第一个错误后