R:如何在OS X El Capitan上安装tiff软件包

时间:2016-01-07 14:31:09

标签: r tiff osx-elcapitan libtiff

我正在尝试使用自制软件安装R在Mac OS X El Capitan上安装R tiff软件包。使用此帖子R: How to install package tiff on Mac OS X Mavericks?来关注建议。

R-版本:

> version
               _                           
platform       x86_64-apple-darwin15.0.0   
arch           x86_64                      
os             darwin15.0.0                
system         x86_64, darwin15.0.0        
status                                     
major          3                           
minor          2.2                         
year           2015                        
month          08                          
day            14                          
svn rev        69053                       
language       R                           
version.string R version 3.2.2 (2015-08-14)
nickname       Fire Safety

> install.packages("tiff", type="source") 
Installing package into '/usr/local/lib/R/3.2/site-library'
(as 'lib' is unspecified)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0100 28925  100 28925    0     0   168k      0 --:--:-- --:--:-- --:--:--  168k
* installing *source* package ‘tiff’ ...
** package ‘tiff’ successfully unpacked and MD5 sums checked
** libs
clang -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include    -fPIC  -I/usr/local/opt/libtiff/include -c common.c -o common.o
common.c:121:16: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
    if (offset < 0 || offset > rj->len) {
        ~~~~~~ ^ ~
1 warning generated.
clang -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include    -fPIC  -I/usr/local/opt/libtiff/include -c read.c -o read.o
clang -I/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/include -DNDEBUG  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include    -fPIC  -I/usr/local/opt/libtiff/include -c write.c -o write.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -o tiff.so common.o read.o write.o -L/usr/local/opt/gettext/lib -F/usr/local/Cellar/r/3.2.2_1/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/lib/R/3.2/site-library/tiff/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/usr/local/lib/R/3.2/site-library/tiff/libs/tiff.so':
  dlopen(/usr/local/lib/R/3.2/site-library/tiff/libs/tiff.so, 6): Symbol not found: _TIFFClientOpen
  Referenced from: /usr/local/lib/R/3.2/site-library/tiff/libs/tiff.so
  Expected in: flat namespace
 in /usr/local/lib/R/3.2/site-library/tiff/libs/tiff.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/3.2/site-library/tiff’
Warning in install.packages :
  installation of package 'tiff' had non-zero exit status

The downloaded source packages are in
    '/private/var/folders/g8/rqv40nhs3zqcntnz_9t9l60w0000gr/T/RtmpJYHafp/downloaded_packages'      

最初,我收到了错误&#39; tiff.h&#39;文件未找到。所以,我修改了〜/ .R / Makevars以包含这些行:

CFLAGS=-I/usr/local/opt/libtiff/include
#LDFLAGS=-L/usr/local/opt/libtiff/lib -llibtiff -llibtiffxx
LDFLAGS=-L/usr/local/opt/libtiff/lib -llibtiff.5 -llibtiffxx.5

安装能够找到tiff.h但是即使在我根据位于文件中的文件尝试了不同的LDFLAGS -l规范之后它也找不到合适的库。 / usr / local / opt / libtiff / lib目录。

brew install libtiff:
Warning: libtiff-4.0.6 already installed

编辑:

> devtools::session_info()
Session info -------------------------------------------------------------
 setting  value                       
 version  R version 3.2.2 (2015-08-14)
 system   x86_64, darwin15.0.0        
 ui       RStudio (0.99.489)          
 language (EN)                        
 collate  C                           
 tz       America/New_York            
 date     2016-01-07                  

Packages -----------------------------------------------------------------
 package       * version date       source        
 BiocInstaller * 1.20.1  2016-01-07 Bioconductor  
 DBI           * 0.3.1   2014-09-24 CRAN (R 3.2.2)
 MASS            7.3-45  2015-11-10 CRAN (R 3.2.2)
 Matrix        * 1.2-3   2015-11-28 CRAN (R 3.2.2)
 MatrixModels    0.4-1   2015-08-22 CRAN (R 3.2.2)
 R6              2.1.1   2015-08-19 CRAN (R 3.2.2)
 RColorBrewer    1.1-2   2014-12-07 CRAN (R 3.2.2)
 RSQLite       * 1.0.0   2014-10-25 CRAN (R 3.2.2)
 Rcpp            0.12.2  2015-11-15 CRAN (R 3.2.2)
 SparseM         1.7     2015-08-15 CRAN (R 3.2.2)
 assertthat      0.1     2013-12-06 CRAN (R 3.2.2)
 car             2.1-1   2015-12-14 CRAN (R 3.2.2)
 caret         * 6.0-62  2015-11-23 CRAN (R 3.2.2)
 chron           2.3-47  2015-06-24 CRAN (R 3.2.2)
 codetools       0.2-14  2015-07-15 CRAN (R 3.2.2)
 colorspace      1.2-6   2015-03-11 CRAN (R 3.2.2)
 devtools        1.9.1   2015-09-11 CRAN (R 3.2.2)
 digest          0.6.8   2014-12-31 CRAN (R 3.2.2)
 doBy          * 4.5-14  2015-12-29 CRAN (R 3.2.2)
 doMC          * 1.3.4   2015-10-13 CRAN (R 3.2.2)
 dplyr         * 0.4.3   2015-09-01 CRAN (R 3.2.2)
 foreach       * 1.4.3   2015-10-13 CRAN (R 3.2.2)
 formatR         1.2.1   2015-09-18 CRAN (R 3.2.2)
 gdata         * 2.17.0  2015-07-04 CRAN (R 3.2.2)
 ggplot2       * 2.0.0   2015-12-18 CRAN (R 3.2.2)
 glmnet        * 2.0-2   2015-04-12 CRAN (R 3.2.2)
 gsubfn        * 0.6-6   2014-08-27 CRAN (R 3.2.2)
 gtable          0.1.2   2012-12-05 CRAN (R 3.2.2)
 gtools          3.5.0   2015-05-29 CRAN (R 3.2.2)
 htmltools       0.3     2015-12-29 CRAN (R 3.2.2)
 iterators     * 1.0.8   2015-10-13 CRAN (R 3.2.2)
 knitr           1.11    2015-08-14 CRAN (R 3.2.2)
 labeling        0.3     2014-08-23 CRAN (R 3.2.2)
 lattice       * 0.20-33 2015-07-14 CRAN (R 3.2.2)
 lazyeval      * 0.1.10  2015-01-02 CRAN (R 3.2.2)
 lme4            1.1-10  2015-10-06 CRAN (R 3.2.2)
 lpSolve         5.6.13  2015-09-19 CRAN (R 3.2.2)
 magrittr        1.5     2014-11-22 CRAN (R 3.2.2)
 memoise         0.2.1   2014-04-22 CRAN (R 3.2.2)
 mgcv            1.8-10  2015-12-12 CRAN (R 3.2.2)
 minqa           1.2.4   2014-10-09 CRAN (R 3.2.2)
 munsell         0.4.2   2013-07-11 CRAN (R 3.2.2)
 nlme            3.1-122 2015-08-19 CRAN (R 3.2.2)
 nloptr          1.0.4   2014-08-04 CRAN (R 3.2.2)
 nnet          * 7.3-11  2015-08-30 CRAN (R 3.2.2)
 pbkrtest        0.4-4   2015-12-12 CRAN (R 3.2.2)
 plyr          * 1.8.3   2015-06-12 CRAN (R 3.2.2)
 proto         * 0.3-10  2012-12-22 CRAN (R 3.2.2)
 quantreg        5.19    2015-08-31 CRAN (R 3.2.2)
 reshape2      * 1.4.1   2014-12-06 CRAN (R 3.2.2)
 rmarkdown       0.9.2   2016-01-01 CRAN (R 3.2.2)
 rpart         * 4.1-10  2015-06-29 CRAN (R 3.2.2)
 rpart.plot    * 1.5.3   2015-10-01 CRAN (R 3.2.2)
 sampling      * 2.7     2015-07-01 CRAN (R 3.2.2)
 scales          0.3.0   2015-08-25 CRAN (R 3.2.2)
 sqldf         * 0.4-10  2014-11-07 CRAN (R 3.2.2)
 stringi         1.0-1   2015-10-22 CRAN (R 3.2.2)
 stringr       * 1.0.0   2015-04-30 CRAN (R 3.2.2)
 survival      * 2.38-3  2015-07-02 CRAN (R 3.2.2)
 tidyr         * 0.3.1   2015-09-10 CRAN (R 3.2.2)
 yaml            2.1.13  2014-06-12 CRAN (R 3.2.2)

我还能尝试其他什么吗?

提前致谢

0 个答案:

没有答案