无法使用renv安装旧版本的stringi

rvpgvaaj  于 2022-12-06  发布在  其他
关注(0)|答案(1)|浏览(217)

我一直在尝试使用renv安装旧版本的stringi,但遇到了以下错误。我在使用restore时遇到了一些早期的错误,但几次重新启动后就可以完成了。我尝试删除并重新安装stringi,但在尝试加载相应的版本时仍然出现了同样的错误。

Installing stringi [1.4.3] ...
    FAILED
Error installing package 'stringi':
===================================

* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/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"C:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c stri_ICU_settings.cpp -o stri_ICU_settings.o
g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/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"C:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c stri_TODO_justify.cpp -o stri_TODO_justify.o
g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/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"C:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c stri_TODO_splitpos.cpp -o stri_TODO_splitpos.o
g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/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"C:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c stri_TODO_uchar.cpp -o stri_TODO_uchar.o
g++  -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.0/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"C:/rtools42/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c stri_brkiter.cpp -o stri_brkiter.o
stri_brkiter.cpp: In member function 'void StriBrkIterOptions::setType(SEXP, const char*)':
stri_brkiter.cpp:60:8: error: 'isNull' was not declared in this scope; did you mean 'Rf_isNull'?
   60 |    if (isNull(opts_brkiter)) {
      |        ^~~~~~
      |        Rf_isNull
stri_brkiter.cpp: In member function 'void StriBrkIterOptions::setLocale(SEXP)':
stri_brkiter.cpp:130:8: error: 'isNull' was not declared in this scope; did you mean 'Rf_isNull'?
  130 |    if (isNull(opts_brkiter)) {
      |        ^~~~~~
      |        Rf_isNull
stri_brkiter.cpp: In member function 'void StriBrkIterOptions::setSkipRuleStatus(SEXP)':
stri_brkiter.cpp:171:8: error: 'isNull' was not declared in this scope; did you mean 'Rf_isNull'?
  171 |    if (isNull(opts_brkiter)) {
      |        ^~~~~~
      |        Rf_isNull
make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:259: stri_brkiter.o] Error 1
ERROR: compilation failed for package 'stringi'
* removing 'D:/Projects/project1/renv/staging/1/stringi'
Error: install of package 'stringi' failed [error code 1]

当我尝试使用devtools直接加载版本时,它与renv冲突
第一次

r8xiu3jd

r8xiu3jd1#

jay.sf的操作系统/平台让我检查了我的设置,我意识到我正在使用不同版本的R。我安装了早期版本,名为renv::restore(),包成功安装。

相关问题