难以安装R包pdftools

难以安装R包pdftools,r,installation,package,pdftools,R,Installation,Package,Pdftools,我正在尝试安装R软件包“pdftools”,并遇到以下问题: In file included from libqpdf/Pl_DCT.cc:1: include/qpdf/Pl_DCT.hh:27:10: fatal error: 'jpeglib.h' file not found #include <jpeglib.h> ^ 1 error generated. make: *** [libqpdf/Pl_DCT.o] Error 1 ERROR: compi

我正在尝试安装R软件包“pdftools”,并遇到以下问题:

In file included from libqpdf/Pl_DCT.cc:1:
include/qpdf/Pl_DCT.hh:27:10: fatal error: 'jpeglib.h' file not found
#include <jpeglib.h>
         ^
1 error generated.
make: *** [libqpdf/Pl_DCT.o] Error 1
ERROR: compilation failed for package ‘qpdf’
文件“jpeglib.h”似乎没有列出,但我在:/anaconda3/pkgs/jpeg-9b-he5867d9_2/include/jpeglib.h中找到了它

  • 根据其他帖子,我尝试从终端:
  • 然后重新启动并再次尝试安装pdftools,结果相同

  • 我也看到了这篇文章,但它完全超出了我的理解范围:

  • 任何简单步骤的解决方案都值得赞赏

    这是我的会话信息,由于限制,我无法将其包含在评论中

    > sessionInfo()
    R version 3.4.3 (2017-11-30)
    Platform: x86_64-apple-darwin15.6.0 (64-bit)
    Running under: macOS High Sierra 10.13.6
    
    Matrix products: default
    BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
    LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
    
    locale:
    [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods  
    [7] base     
    
    other attached packages:
    [1] pdftools_2.2
    
    loaded via a namespace (and not attached):
    [1] compiler_3.4.3 tools_3.4.3    pillar_1.2.1   tibble_1.4.2  
    [5] Rcpp_1.0.1     qpdf_1.1       rlang_0.3.0.1  askpass_1.1
    

    我刚刚安装了pdftools,没有任何问题。升级R版本可能会解决您的问题

    你好,我在我的mac电脑上试过了,安装起来没有任何问题。您是否安装了askpass软件包?对-我应该提到我无法更新到R3.6.1,因为目前我无法从OS X 10.10.5进行更新。找不到可以安装的更高版本的R(例如R 3.4.3)。有解决办法吗?您可以从该链接找到3.4.3和其他版本。如果对您有效,请不要忘记升级投票或接受答案,最好:)看起来R3.4.3需要更高版本的OS X,因此我暂时无法接受,除非有办法在编译过程中找到jpeglib.h。
    $ brew install boost. (Lot of installing, no errors)
    $ brew doctor (Lot of installing, no errors)
    $ xcode-select: error: command line tools are already installed, use "Software Update" to install updates
    $ brew install cairo gobject-introspection pixman (Lot of installing, no errors)
    
    > sessionInfo()
    R version 3.4.3 (2017-11-30)
    Platform: x86_64-apple-darwin15.6.0 (64-bit)
    Running under: macOS High Sierra 10.13.6
    
    Matrix products: default
    BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
    LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
    
    locale:
    [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods  
    [7] base     
    
    other attached packages:
    [1] pdftools_2.2
    
    loaded via a namespace (and not attached):
    [1] compiler_3.4.3 tools_3.4.3    pillar_1.2.1   tibble_1.4.2  
    [5] Rcpp_1.0.1     qpdf_1.1       rlang_0.3.0.1  askpass_1.1