如何解决R上的install.packages“ stringi”问题
在Windows 10上,RStudio。我尝试使用命令install.packages,但此消息却消失了:
> install.packages ("stringi")
There is a binary version available but the source version is later:
binary source needs_compilation
stringi 1.4.6 1.5.3 TRUE
installing the source package ‘stringi’
trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.5.3.tar.gz'
Content type 'application/x-gzip' length 7293930 bytes (7.0 MB)
downloaded 7.0 MB
* installing *source* package 'stringi' ...
** package 'stringi' successfully unpacked and MD5 sums checked
** using staged installation
** libs
C:/Users/Natusha/Google Drive (natusha.alirr@gmail.com)/R/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/Users/Natusha/GOOGLE~2.COM/R/R-36~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 -O2 -Wall -mtune=generic -c stri_pad.cpp -o stri_pad.o
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `C:/Users/Natusha/Google Drive (natusha.alirr@gmail.com)/R/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/Users/Natusha/GOOGLE~2.COM/R/R-36~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 -O2 -Wall -mtune=generic -c stri_pad.cpp -o stri_pad.o'
make: *** [C:/Users/Natusha/GOOGLE~2.COM/R/R-36~1.1/etc/x64/Makeconf:215: stri_pad.o] Error 1
ERROR: compilation failed for package 'stringi'
* removing 'C:/Users/Natusha/Google Drive (natusha.alirr@gmail.com)/R/R-3.6.1/library/stringi'
* restoring previous 'C:/Users/Natusha/Google Drive (natusha.alirr@gmail.com)/R/R-3.6.1/library/stringi'
Warning in install.packages :
installation of package ‘stringi’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Natusha\AppData\Local\Temp\RtmpuSXwbu\downloaded_packages’
我该怎么办?我尝试将文件夹直接下载并粘贴到库中,但是没有用。 我也尝试过
install.packages("stringi",type = "source")
options(install.packages.check.source = "no")
但是出现相同的消息。 有人可以帮我吗?
解决方法
如果您使用的是Windows,则如果源安装失败(并且您不希望使用源软件包),则坚持使用 binary 软件包。
install.packages ("stringi",type = "win.binary")
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。