如何在Mac上安装RtidyHTML?

时间:2011-07-04 12:17:55

标签: r html-parsing package

当我收到以下错误消息时,我是如何安装RTidyHTML的?

install.packages("RTidyHTML", repos = "http://www.omegahat.org/R", type="source")
trying URL 'http://www.omegahat.org/R/src/contrib/RTidyHTML_0.2-1.tar.gz'
Content type 'application/x-gzip' length 554953 bytes (541 Kb)
opened URL
==================================================
downloaded 541 Kb

* installing *source* package ‘RTidyHTML’ ...
./configure: line 3: make: command not found
ERROR: configuration failed for package ‘RTidyHTML’
* removing ‘/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML’

1 个答案:

答案 0 :(得分:2)

如果要从源代码编译,则需要在Mac上安装XCode。 (Roman的评论仅适用于Windows机器。)我只是尝试在装有XCode的Mac上安装它,运行R 2.13.0并在编译期间首先发出警告

ld warning: in libtidy/libtidy.a, file is not of required architecture
installing to /Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML/libs/x86_64

...然后在作为安装脚本一部分的测试加载期间出错:

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML/libs/x86_64/RTidyHTML.so': 
dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML/libs/x86_64/RTidyHTML.so, 6): Symbol not found: _tidyBufFree
  Referenced from: /Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML/libs/x86_64/RTidyHTML.so
  Expected in: dynamic lookup

我想它有可能在Mac.64位的32位版本的R下编译。有关更多详细信息,请参阅Simon Urbanek's web page:,有关其他软件包,请参阅一些安装程序。

编辑:从GUI运行32位R时安装成功使用当前R(版本2.13.1 RC(2011-07-03 r56263))