我想安装FFTW以启用该Rcartogram
软件包。
尝试
homebrew
通过以下方式安装fftw
库后homebrew
:
brew install fftw --with-fortran --with-mpi --with-openmp --enable-float
尝试安装Rcartogram
失败并出现以下错误:
>> devtools::install_github("omegahat/Rcartogram")
Downloading GitHub repo omegahat/Rcartogram@master
from URL https://api.github.com/repos/omegahat/Rcartogram/zipball/master
Installing Rcartogram
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ \
--no-save --no-restore --quiet CMD INSTALL \
'/private/var/folders/7x/kwc1y_l96t55_rwlv35mg8xh0000gn/T/Rtmp7nMfM9/devtoolsa9f2458e68c3/omegahat-Rcartogram-715cb93' \
--library='/Users/whereIkeepMyStuff' --install-tests
* installing *source* package ‘Rcartogram’ ...
(...)
Can compile with fftw3.h
checking for fftw_malloc in -lfftw3... no
configure: error: "cannot link to libfftw3"
ERROR: configuration failed for package ‘Rcartogram’
* removing (...)
Error: Command failed (1)
make install
作为第二种方法,我尝试了此处提供的指南并使用以下语法安装FFTW :
wget http://www.fftw.org/fftw-3.3.6-pl1.tar.gz
tar -xvzf fftw-3.3.6-pl1.tar.gz
cd fftw-3.3.6-pl1
./configure --prefix=/usr/local/fftw-3.6.6 --enable-threads \
--enable-float --enable-shared \
CC="gcc -arch i386 -arch x86_64" CXX="g++ -arch i386 -arch x86_64" \
CPP="gcc -E" CXXCPP="g++ -E" F77=gfortran
make
sudo make install
sudo ln -s /usr/local/fftw-3.6.6 /usr/local/fftw
这失败如下:
>> devtools::install_github("omegahat/Rcartogram")
(...)
* installing *source* package ‘Rcartogram’ ...
checking for pkg-config... /usr/local/bin/pkg-config
Package fftw3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `fftw3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fftw3' found
Package fftw3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `fftw3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fftw3' found
Looking for fftw3 files in /usr/local
Cannot find fftw.h
ERROR: configuration failed for package ‘Rcartogram’
配置
操作系统
sw_vers -productVersion 10.12.2
R
R --version R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit)
如何安装FFTW以便我可以使用该Rcartogram
软件包?
打扫
尝试失败后,我会清理:
自制
brew uninstall fftw
壳
sudo make uninstall sudo rm -rv /usr/local/fftw*