首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能使用renv安装旧版本的stringi

未能使用renv安装旧版本的stringi
EN

Stack Overflow用户
提问于 2022-11-28 04:43:30
回答 1查看 18关注 0票数 0

我一直试图使用renv安装一个旧版本的stringi i,并得到以下错误。在使用restore之前,我遇到了一些错误,但是一些重新启动已经能够通过。我试着删除和重新安装stringi i,但是在加载适当的版本时仍然会出现相同的错误。

代码语言:javascript
复制
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冲突

代码语言:javascript
复制
require(devtools)
install_version("stringi", version = "1.4.3", repos = "http://cran.us.r-project.org")
代码语言:javascript
复制
require(devtools)
Loading required package: devtools
Loading required package: usethis
Warning messages:
1: package ‘devtools’ was built under R version 4.2.2 
2: package ‘usethis’ was built under R version 4.2.2 
> install_version("stringi", version = "1.4.3", repos = "http://cran.us.r-project.org")
Downloading package from url: http://cran.us.r-project.org/src/contrib/Archive/stringi/stringi_1.4.3.tar.gz
Installing package into ‘D:/Projects/project1/renv/library/R-4.2/x86_64-w64-mingw32’
(as ‘lib’ is unspecified)
ℹ Using R 4.2.0 (lockfile was generated with R 4.0.3)
* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
ERROR: cannot remove earlier installation, is it in use?
* removing 'D:/Projects/project1/renv/library/R-4.2/x86_64-w64-mingw32/stringi'
* restoring previous 'D:/Projects/project1/renv/library/R-4.2/x86_64-w64-mingw32/stringi'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
  problem copying D:\Projects\project1\renv\library\R-4.2\x86_64-w64-mingw32\00LOCK-stringi\stringi\libs\icudt69l.dat to D:\Projects\project1\renv\library\R-4.2\x86_64-w64-mingw32\stringi\libs\icudt69l.dat: Invalid argument
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
  problem copying D:\Projects\project1\renv\library\R-4.2\x86_64-w64-mingw32\00LOCK-stringi\stringi\libs\x64\stringi.dll to D:\Projects\project1\renv\library\R-4.2\x86_64-w64-mingw32\stringi\libs\x64\stringi.dll: Permission denied
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/user/AppData/Local/Temp/RtmpK41CGy/remotesce6857a77e39/stringi’ had non-zero exit status
> 
EN

回答 1

Stack Overflow用户

发布于 2022-11-28 12:34:51

jay.sf的OS/platform让我检查了我的安装程序,我意识到我使用的是不同版本的R。我安装了早期版本,名为renv::restore()并成功安装了包。

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

https://stackoverflow.com/questions/74596078

复制
相关文章

相似问题

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