> 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
这就是我不使用依赖参数时会发生的事情
> 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发出同样的问题时,人们使用了其他一些包的命令,我尝试了它们,没有发生任何事情,所以我想在不知道我在做什么的情况下停止做任何事情。
答案 0 :(得分:1)
首先尝试:
install.packages("swirl", dependencies=TRUE)
如果失败,请尝试:
install.packages("stringr", dependencies=TRUE)
install.packages("stringi", dependencies=TRUE)
install.packages("swirl", dependencies=TRUE)
Swirl需要这些软件包,如果它们尚未使用dependencies=TRUE
安装,则应强制它们同时安装,如果没有,请自行预安装并查看旋转是否有效。