R:如何在Mac OS X Mavericks上安装软件包tiff? [英] R: How to install package tiff on Mac OS X Mavericks?

查看:203
本文介绍了R:如何在Mac OS X Mavericks上安装软件包tiff?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从rforge安装软件包tiff( http://www.rforge.net/tiff/index.html )(在Mac OS X Mavericks上).

I'd like to install package tiff from rforge (http://www.rforge.net/tiff/index.html) on Mac OS X Mavericks.

R版本为

    > version
                   _                           
    platform       x86_64-apple-darwin13.1.0   
    arch           x86_64                      
    os             darwin13.1.0                
    system         x86_64, darwin13.1.0        
    status                                     
    major          3                           
    minor          1.0                         
    year           2014                        
    month          04                          
    day            10                          
    svn rev        65387                       
    language       R                           
    version.string R version 3.1.0 (2014-04-10)
    nickname       Spring Dance           

尝试安装它时出现以下错误:

Trying to install it I get the following error:

    > install.packages("tiff","http://rforge.net/",type="source")
    Warning in install.packages :
      'lib = "http://rforge.net/"' is not writable
    Would you like to use a personal library instead?  (y/n) y
    versuche URL 'http://cran.rstudio.com/src/contrib/tiff_0.1-5.tar.gz'
    Content type 'application/x-gzip' length 28925 bytes (28 Kb)
    URL geöffnet
    ==================================================
    downloaded 28 Kb

    * installing *source* package ‘tiff’ ...
    ** Paket ‘tiff’ erfolgreich entpackt und MD5 Summen überprüft
    ** libs
    clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c common.c -o common.o
    In file included from common.c:1:
    ./common.h:5:10: fatal error: 'tiff.h' file not found
    #include <tiff.h>
             ^
    1 error generated.
    make: *** [common.o] Error 1
    ERROR: compilation failed for package ‘tiff’
    * removing ‘/Users/stingl/Library/R/3.1/library/tiff’
    Warning in install.packages :
      installation of package ‘tiff’ had non-zero exit status

    The downloaded source packages are in
      ‘/private/var/folders/8_/1kgvxblj3ss4pzmsgx3pkysc0000gn/T/RtmpYmsCmF/downloaded_packages’

有什么想法吗?

推荐答案

如果您有 macports 自制软件已安装,您应该使用它们来安装libtiff.

If you've got macports or homebrew installed, you should use them to install libtiff.

这是使用自制软件安装libtiff所需要的:

Here's what you need to run to install libtiff using homebrew:

brew install libtiff

完成此操作后,您可以将tiff软件包安装在R中:

After this is done, you can install the tiff package in R:

install.packages("tiff", type="source") 

干杯

乔治

这篇关于R:如何在Mac OS X Mavericks上安装软件包tiff?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆