我收到一個錯誤,如下所示:
gcc -m64 -I/usr/include/R -DNDEBUG -I/usr/local/include -fpic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c read.c -o read.o
In file included from read.c:1:0:
rjcommon.h:11:21: fatal error: jpeglib.h: No such file or directory
compilation terminated.
/usr/lib64/R/etc/Makeconf:134: recipe for target 'read.o' failed
make: *** [read.o] Error 1
ERROR: compilation failed for package ‘jpeg’
* removing ‘/home/-/R/x86_64-redhat-linux-gnu-library/3.2/jpeg’
Warning in install.packages :
installation of package ‘jpeg’ had non-zero exit status
ERROR: dependency ‘jpeg’ is not available for package ‘ggmap’
* removing ‘/home/-/R/x86_64-redhat-linux-gnu-library/3.2/ggmap’
Warning in install.packages :
installation of package ‘ggmap’ had non-zero exit status
所以據我所知,基本上 R 無法獲得 jpeg 支持,但我已經安裝了這個:
http://rpmfind.net/linux/rpm2html/search.php?query=openjpeg-libs%28x86-32%29
對於 Fedora 22 x64 並不能解決問題。有什麼解決辦法嗎?我缺什麼?
答案1
您缺少 JPEG 庫的開發包。openjpeg-libs
是一個運行時包,這意味著它不包含編譯使用該庫的原始檔時所需的頭檔。
然而,這openjpeg-libs
不是您需要的,基於 rpmfind.net 搜尋遺失.h
檔案的正確檔案是libjpeg-turbo-devel
。當然,你還需要相應的運行時庫libjpeg-turbo
。