如何在 Fedora 22 中添加 jpeg 支持以便 R 可以使用它?

如何在 Fedora 22 中添加 jpeg 支持以便 R 可以使用它?

我收到错误,如下所示:

    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

相关内容