twitteR包安装失败

时间:2014-01-15 06:05:02

标签: r twitter package

您好我正在尝试安装twitteR软件包,但是它给出了错误。以前的版本我得到了同样的错误,所以我卸载它并再次重新安装R.但我再次遇到同样的问题。有谁可以帮助我吗。提前谢谢。

** testing if installed package can be loaded
* DONE (rjson)
* installing *source* package ‘RCurl’ ...
** package ‘RCurl’ successfully unpacked and MD5 sums checked
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/usr/local/lib/R/site-library/RCurl’
ERROR: dependency ‘RCurl’ is not available for package ‘ROAuth’
* removing ‘/usr/local/lib/R/site-library/ROAuth’
ERROR: dependencies ‘ROAuth’, ‘RCurl’ are not available for package ‘twitteR’
* removing ‘/usr/local/lib/R/site-library/twitteR’

下载的源包在     “/ TMP / RtmpeTWabe / downloaded_pa​​ckages” 警告信息:

1: In install.packages("twitteR", dep = TRUE) :
  installation of package ‘RCurl’ had non-zero exit status
2: In install.packages("twitteR", dep = TRUE) :
  installation of package ‘ROAuth’ had non-zero exit status
3: In install.packages("twitteR", dep = TRUE) :
  installation of package ‘twitteR’ had non-zero exit status
> library(twitteR)
Error in library(twitteR) : there is no package called ‘twitteR’
> version
               _                           
platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          0.2                         
year           2013                        
month          09                          
day            25                          
svn rev        63987                       
language       R                           
version.string R version 3.0.2 (2013-09-25)
nickname       Frisbee Sailing 

1 个答案:

答案 0 :(得分:2)

尝试安装twitteR软件包,它会自动尝试安装ROauth(因为它是建议的软件包),这取决于liboauth。您可以从http://liboauth.sourceforge.net下载liboauth

安装Rcurl

$sudo apt-get install libcurl4-openssl-dev

你可以用类似的术语来做。从Linux命令行安装一个R包。假设我们想安装“可能性”R包。你可以通过以下方式下载:

$ wget -q http://cran.csiro.au/src/contrib/likelihood_1.5.tar.gz

接下来,我们使用R CMD INSTALL命令进行安装。请注意,根据安装目的地,您可能需要拥有超级用户权限:

    $ sudo R CMD INSTALL likelihood_1.5.tar.gz 
[sudo] password for lubos: 
* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘likelihood’ ...
** package ‘likelihood’ successfully unpacked and MD5 sums checked
** R
** data
** demo
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded

* DONE (likelihood)

注意:请注意,某些软件包需要先决条件。在这种情况下,使用上面的命令在所需的包之前安装先决条件。