LoginSignup
1
0

More than 5 years have passed since last update.

R 3.3.1/Debian (Jessie)でのEBImageインストール

Posted at

Rで画像処理を行うパッケージEBImage。外部のライブラリとかいろいろ使っててインストール時のコンパイルでエラーになってハマることがあるらしく、案の定ハマったのでメモ。

よく言及されてるImageMagickとかgtkとかは既に入ってたのでよしとして。

インストールはsudo Rと管理者で起動して、

source("http://bioconductor.org/biocLite.R")
biocLite("EBImage")

だが、やってみたらエラーになってインストールできない。

お題 : BioC 3.1ではlibfftw3-devが必要です

原因はというと、

install.packages(pkgs = doing, lib = lib, ...) で: 
installation of package ‘fftwtools’ had non-zero exit status

というわけで、fftwtools依存パッケージがインストールできないためらしい。
ググるとfftwなる外部ライブラリが必要のようで、debian系apt-getというわけで、

sudo apt-get install fftw-dev

してみるとインストールされたがやっぱりダメ。さらに調べるとfftwにバージョンがあるらしい。

EBImage has changed in BioC 3.1: now it depends on CRAN package fftwtools which requires libfftw3-dev to compile.

だそうで。インストールの出力をよ〜く見ると確かに、

gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c fftwtools.c -o fftwtools.o
fftwtools.c:28:18: fatal error: fftw3.h: そのようなファイルやディレクトリはありません
 #include<fftw3.h>
                  ^
compilation terminated.
/usr/lib/R/etc/Makeconf:132: recipe for target 'fftwtools.o' failed

としっかりオコられておりました…。

sudo apt-get install fftw3-dev

でインストールしなおして無事EBImageできるようになりましたとさ。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0