首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在Mac OS10.9上的R 3.2.1中安装Swirl -安装状态为非零

无法在Mac OS10.9上的R 3.2.1中安装Swirl -安装状态为非零
EN

Stack Overflow用户
提问于 2017-08-15 17:36:28
回答 1查看 246关注 0票数 0
代码语言:javascript
复制
> install.packages("swirl", depenedencies=TRUE)
--- Please select a CRAN mirror for use in this session ---
also installing the dependencies ‘stringi’, ‘stringr’


  There are binary versions available but the source versions are
  later:
        binary source needs_compilation
stringi  1.1.1  1.1.5             FALSE
stringr  1.0.0  1.2.0             FALSE
swirl    2.4.2  2.4.3             FALSE

installing the source packages ‘stringi’, ‘stringr’, ‘swirl’

Error in download.file(url, destfile, method, mode = "wb", ...) : 
  unused argument (depenedencies = TRUE)
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘stringi’ failed
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  unused argument (depenedencies = TRUE)
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘stringr’ failed
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  unused argument (depenedencies = TRUE)
Warning in download.packages(pkgs, destdir = tmpd, available = available,  :
  download of package ‘swirl’ failed

这就是当我不使用依赖参数时会发生的事情

代码语言:javascript
复制
   > install.packages("swirl")
also installing the dependencies ‘stringi’, ‘stringr’


  There are binary versions available but the source versions are
  later:
        binary source needs_compilation
stringi  1.1.1  1.1.5             FALSE
stringr  1.0.0  1.2.0             FALSE
swirl    2.4.2  2.4.3             FALSE

installing the source packages ‘stringi’, ‘stringr’, ‘swirl’

trying URL 'http://cran.stat.auckland.ac.nz/src/contrib/stringi_1.1.5.tar.gz'
Content type 'application/x-gzip' length 3645872 bytes (3.5 MB)
==================================================
downloaded 3.5 MB

trying URL 'http://cran.stat.auckland.ac.nz/src/contrib/stringr_1.2.0.tar.gz'
Content type 'application/x-gzip' length 94095 bytes (91 KB)
==================================================
downloaded 91 KB

trying URL 'http://cran.stat.auckland.ac.nz/src/contrib/swirl_2.4.3.tar.gz'
Content type 'application/x-gzip' length 108666 bytes (106 KB)
==================================================
downloaded 106 KB

* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
checking for local ICUDT_DIR... icu55/data
checking for R_HOME... /Library/Frameworks/R.framework/Resources
checking for R... /Library/Frameworks/R.framework/Resources/bin/R
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... yes
checking for cat... /bin/cat
checking for gcc... llvm-gcc-4.2 -arch x86_64 -std=gnu99
checking whether the C compiler works... no
configure: error: in `/private/var/folders/6h/2hpqtkx11xz8lytwg01m1tm40000gn/T/RtmpQqUeGZ/R.INSTALL3b727191707/stringi':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/stringi’
ERROR: dependency ‘stringi’ is not available for package ‘stringr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/stringr’
ERROR: dependency ‘stringr’ is not available for package ‘swirl’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/swirl’

The downloaded source packages are in
    ‘/private/var/folders/6h/2hpqtkx11xz8lytwg01m1tm40000gn/T/RtmpGnEGTh/downloaded_packages’
Warning messages:
1: In install.packages("swirl") :
  installation of package ‘stringi’ had non-zero exit status
2: In install.packages("swirl") :
  installation of package ‘stringr’ had non-zero exit status
3: In install.packages("swirl") :
  installation of package ‘swirl’ had non-zero exit status
>  

我是编程新手,还不太确定如何阅读这篇文章。当R给出同样的问题时,人们在其他包中使用了几个命令,我尝试了这些命令,但什么也没有发生,所以我想我应该在不知道自己在做什么的情况下停止做任何事情。

EN

回答 1

Stack Overflow用户

发布于 2017-08-15 20:09:19

先试试这个:

代码语言:javascript
复制
install.packages("swirl", dependencies=TRUE)

如果失败,请尝试执行以下操作:

代码语言:javascript
复制
install.packages("stringr", dependencies=TRUE)
install.packages("stringi", dependencies=TRUE)
install.packages("swirl", dependencies=TRUE)

Swirl需要这些软件包,如果它们还没有使用dependencies=TRUE安装,应该强制它们同时安装,如果没有,请自己预安装它们,看看swirl是否可以工作。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45690271

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档