首页 > 解决方案 > 尝试在 R Studio 中安装安装程序时出错

问题描述

我的目标是安装闪亮但由于rlang无法安装包而失败,所以我尝试更新我的 R 版本,因为我读过这可以解决一些问题。但是我没有更新,因为我在安装时遇到了同样的问题installr。多讽刺...

这是我的会话信息:

sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows  x64 (build 18362)

locale:
[1] LC_COLLATE=German_Switzerland.1252  LC_CTYPE=German_Switzerland.1252    LC_MONETARY=German_Switzerland.1252
[4] LC_NUMERIC=C                        LC_TIME=German_Switzerland.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.2.1

这是我尝试安装时的错误消息installr

> install.packages("installr")
Installing package into ‘C:/Users/yannick.schwarz/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘stringi’, ‘stringr’


  Es gibt Binärversionen, jedoch sind die Quelltexte neuer:
         binary source needs_compilation
stringi   1.1.5  1.4.3              TRUE
stringr   1.2.0  1.4.0             FALSE
installr 0.18.0 0.22.0             FALSE

Möchten Sie versuchen, das Paket aus den Quelltexten
zu installieren, was eine Kompilierung erfordert?
y/n: y
installing the source packages ‘stringi’, ‘stringr’, ‘installr’

trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.4.3.tar.gz'
Content type 'application/x-gzip' length 7290890 bytes (7.0 MB)
downloaded 7.0 MB

trying URL 'https://cran.rstudio.com/src/contrib/stringr_1.4.0.tar.gz'
Content type 'application/x-gzip' length 135777 bytes (132 KB)
downloaded 132 KB

trying URL 'https://cran.rstudio.com/src/contrib/installr_0.22.0.tar.gz'
Content type 'application/x-gzip' length 146544 bytes (143 KB)
downloaded 143 KB

* installing *source* package 'stringi' ...
** Paket 'stringi' erfolgreich entpackt und MD5 Summen überprüft
** libs

*** arch - i386
g++ -m32 -std=c++0x -I"C:/PROGRA~1/R/R-32~1.1/include" -DNDEBUG -I. -Iicu61/ -Iicu61/unicode -Iicu61/common -Iicu61/i18n -DU_STATIC_IMPLEMENTATION -DU_COMMON_IMPLEMENTATION -DU_I18N_IMPLEMENTATION -DUCONFIG_USE_LOCAL -DU_TOOLUTIL_IMPLEMENTATION -DNDEBUG -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -DU_USE_STRTOD_L=0    -I"d:/RCompile/r-compiling/local/local320/include"     -O2 -Wall  -mtune=core2 -c stri_ICU_settings.cpp -o stri_ICU_settings.o
In file included from icu61/unicode/brkiter.h:47:0,
                 from stri_external.h:60,
                 from stri_stringi.h:36,
                 from stri_ICU_settings.cpp:33:
icu61/unicode/unistr.h: In constructor 'icu_61_stringi::UnicodeString::UnicodeString(const uint16_t*)':
icu61/unicode/unistr.h:3010:7: error: type 'icu_61_stringi::UnicodeString' is not a direct base of 'icu_61_stringi::UnicodeString'
icu61/unicode/unistr.h: In constructor 'icu_61_stringi::UnicodeString::UnicodeString(const wchar_t*)':
icu61/unicode/unistr.h:3026:7: error: type 'icu_61_stringi::UnicodeString' is not a direct base of 'icu_61_stringi::UnicodeString'
icu61/unicode/unistr.h: In constructor 'icu_61_stringi::UnicodeString::UnicodeString(const uint16_t*, int32_t)':
icu61/unicode/unistr.h:3060:7: error: type 'icu_61_stringi::UnicodeString' is not a direct base of 'icu_61_stringi::UnicodeString'
icu61/unicode/unistr.h: In constructor 'icu_61_stringi::UnicodeString::UnicodeString(const wchar_t*, int32_t)':
icu61/unicode/unistr.h:3073:7: error: type 'icu_61_stringi::UnicodeString' is not a direct base of 'icu_61_stringi::UnicodeString'
icu61/unicode/unistr.h: In constructor 'icu_61_stringi::UnicodeString::UnicodeString(uint16_t*, int32_t, int32_t)':
icu61/unicode/unistr.h:3141:7: error: type 'icu_61_stringi::UnicodeString' is not a direct base of 'icu_61_stringi::UnicodeString'
icu61/unicode/unistr.h: In constructor 'icu_61_stringi::UnicodeString::UnicodeString(wchar_t*, int32_t, int32_t)':
icu61/unicode/unistr.h:3155:7: error: type 'icu_61_stringi::UnicodeString' is not a direct base of 'icu_61_stringi::UnicodeString'
make: *** [stri_ICU_settings.o] Error 1
Warnung: Ausführung von Kommando 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-32~1.1/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.1/share/make/winshlib.mk" CXX='$(CXX1X) $(CXX1XSTD)' CXXFLAGS='$(CXX1XFLAGS)' CXXPICFLAGS='$(CXX1XPICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)' SHLIB_LD='$(SHLIB_CXX1XLD)' SHLIB="stringi.dll" ' ergab Status 2
ERROR: compilation failed for package 'stringi'
* removing 'C:/Users/yannick.schwarz/Documents/R/win-library/3.2/stringi'
* restoring previous 'C:/Users/yannick.schwarz/Documents/R/win-library/3.2/stringi'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\yannick.schwarz\Documents\R\win-library\3.2" C:\Users\YANNIC~1.SCH\AppData\Local\Temp\RtmpKSUt2L/downloaded_packages/stringi_1.4.3.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status
* installing *source* package 'stringr' ...
** Paket 'stringr' erfolgreich entpackt und MD5 Summen überprüft
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'stringi' 1.1.5 is being loaded, but >= 1.1.7 is required
ERROR: lazy loading failed for package 'stringr'
* removing 'C:/Users/yannick.schwarz/Documents/R/win-library/3.2/stringr'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\yannick.schwarz\Documents\R\win-library\3.2" C:\Users\YANNIC~1.SCH\AppData\Local\Temp\RtmpKSUt2L/downloaded_packages/stringr_1.4.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘stringr’ had non-zero exit status
ERROR: dependency 'stringr' is not available for package 'installr'
* removing 'C:/Users/yannick.schwarz/Documents/R/win-library/3.2/installr'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\yannick.schwarz\Documents\R\win-library\3.2" C:\Users\YANNIC~1.SCH\AppData\Local\Temp\RtmpKSUt2L/downloaded_packages/installr_0.22.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘installr’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\yannick.schwarz\AppData\Local\Temp\RtmpKSUt2L\downloaded_packages’

请帮我。我知道网上有很多类似的问题,但到目前为止我没有找到任何对我有帮助的东西。提前致谢!

标签: rupdatesinstallr

解决方案


推荐阅读