在 ubuntu 上安装 fftw

在 ubuntu 上安装 fftw

我正在安装 fftw 但是它出现错误并且终端显示此

make[2]: Entering directory `/home/suraj/Desktop/fftw/api'
make[3]: Entering directory `/home/suraj/Desktop/fftw/api'
make[3]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/usr/local/include'
 /usr/bin/install -c -m 644 fftw3.h fftw3.f fftw3l.f03 fftw3q.f03 '/usr/local/include'
/usr/bin/install: cannot create regular file ‘/usr/local/include/fftw3.h’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/local/include/fftw3.f’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/local/include/fftw3l.f03’: Permission denied
/usr/bin/install: cannot create regular file ‘/usr/local/include/fftw3q.f03’: Permission denied
make[3]: *** [install-includeHEADERS] Error 1
make[3]: Leaving directory `/home/suraj/Desktop/fftw/api'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/suraj/Desktop/fftw/api'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/suraj/Desktop/fftw/api'
make: *** [install-recursive] Error 1

答案1

这是很简单的事情。你尝试以普通用户身份执行 MAKE INSTALL,而普通用户无法将文件放入这些目录中,因为用户无权这样做。

尝试以下操作

make clean
make
sudo make install

相关内容