警告:运行命令“sh ./configure.win”的状态为127

我正在尝试使用install.packages()安装软件包“stringi”,但遇到以下错误:

PackDirB="C:\\Users\\PC\\Documents\\R\\win-library\\3.2\\stringi_0.5-5.tar.gz" > install.packages(PackDirB, repos=NULL, type="source") Installing package into 'C:/Users/PC/Documents/R/win-library/3.2' (as 'lib' is unspecified) * installing *source* package 'stringi' ... ** package 'stringi' successfully unpacked and MD5 sums checked Warning: running command 'sh ./configure.win' had status 127 ERROR: configuration failed for package 'stringi' * removing 'C:/Users/Santos/Documents/R/win-library/3.2/stringi' Warning messages: 1: running command '"C:/PROGRA~1/R/R-32~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\PC\Documents\R\win-library\3.2" "C:/Users/PC/Documents/R/win-library/3.2/stringi_0.5-5.tar.gz"' had status 1 2: In install.packages(PackDirB, repos = NULL, type = "source") : installation of package 'C:/Users/PC/Documents/R/win-library/3.2/stringi_0.5-5.tar.gz' had non-zero exit status 

发生了什么? 我应该做些什么?

假设你在Windows操作系统下运行,你是否安装了Cygwin? 尝试在控制台窗口中运行sh命令,看看是否能识别它。 如果没有,从这里安装Cygwin,然后再次尝试安装R软件包。 **注意:**确保Cygwin的位置被添加到PATH 。 希望能帮助到你。