问题描述
编辑:问题最终导致TERR 5.1.0实际上基于R 3.6。因此需要Rtools35。第二个问题是我试图将软件包安装到Rstudio设置为默认位置的网络位置,原因是它已安装在Parallels VM中。
最近几天,我一直在努力解决这个问题。 关于如何使用rtools40解决问题的文章很多,我阅读了所有可以找到的内容,但仍然无法解决该问题。 可能是因为我必须使用Rstudio和TERR(R =的TIBCO Enterprise Runtime)而不是R,并且一切都在Parallels VM中运行。
在安装软件包时(在本例中为纯素食者,但也尝试了devtools,tidyverse等),我得到了以下错误:
> install.packages("vegan",verbose = TRUE)
also installing the dependencies 'lattice' 'Matrix' 'nlme' 'mgcv' 'cluster' 'MASS' 'permute'
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Trying to download URL 'https://cloud.r-project.org/bin/windows/contrib/3.6/lattice_0.20-41.zip' to file 'C:\TEMP\TERR_06cc00291/downloaded_packages/lattice_0.20-41.zip'
Downloaded 1174416 bytes
Trying to download URL 'https://cloud.r-project.org/bin/windows/contrib/3.6/Matrix_1.2-18.zip' to file 'C:\TEMP\TERR_06cc00291/downloaded_packages/Matrix_1.2-18.zip'
Downloaded 4523013 bytes
Trying to download URL 'https://cloud.r-project.org/bin/windows/contrib/3.6/nlme_3.1-149.zip' to file 'C:\TEMP\TERR_06cc00291/downloaded_packages/nlme_3.1-149.zip'
Downloaded 2378266 bytes
Trying to download URL 'https://cloud.r-project.org/bin/windows/contrib/3.6/mgcv_1.8-33.zip' to file 'C:\TEMP\TERR_06cc00291/downloaded_packages/mgcv_1.8-33.zip'
Downloaded 3315098 bytes
Trying to download URL 'https://cloud.r-project.org/bin/windows/contrib/3.6/cluster_2.1.0.zip' to file 'C:\TEMP\TERR_06cc00291/downloaded_packages/cluster_2.1.0.zip'
Downloaded 593835 bytes
Trying to download URL 'https://cloud.r-project.org/bin/windows/contrib/3.6/MASS_7.3-52.zip' to file 'C:\TEMP\TERR_06cc00291/downloaded_packages/MASS_7.3-52.zip'
Downloaded 1191263 bytes
Trying to download URL 'https://cloud.r-project.org/bin/windows/contrib/3.6/permute_0.9-5.zip' to file 'C:\TEMP\TERR_06cc00291/downloaded_packages/permute_0.9-5.zip'
Downloaded 507227 bytes
Trying to download URL 'https://cloud.r-project.org/bin/windows/contrib/3.6/vegan_2.5-6.zip' to file 'C:\TEMP\TERR_06cc00291/downloaded_packages/vegan_2.5-6.zip'
Downloaded 3846550 bytes
* installing *binary* package lattice from "C:\\TEMP\\TERR_06cc00291\\downloaded_packages\\lattice_0.20-41.zip" to "\\\\Mac\\Home\\Documents\\TERR\\x86_64-w64-mingw32-library\\5.1"
'\\Mac\Home\Documents\TERR\x86_64-w64-mingw32-library\5.1'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* checking MD5 checksums
Could NOT CHECK MD5 CHECKSUMS (probably no lattice/MD5 file)
* installing *binary* package Matrix from "C:\\TEMP\\TERR_06cc00291\\downloaded_packages\\Matrix_1.2-18.zip" to "\\\\Mac\\Home\\Documents\\TERR\\x86_64-w64-mingw32-library\\5.1"
'\\Mac\Home\Documents\TERR\x86_64-w64-mingw32-library\5.1'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* checking MD5 checksums
Could NOT CHECK MD5 CHECKSUMS (probably no Matrix/MD5 file)
* installing *binary* package nlme from "C:\\TEMP\\TERR_06cc00291\\downloaded_packages\\nlme_3.1-149.zip" to "\\\\Mac\\Home\\Documents\\TERR\\x86_64-w64-mingw32-library\\5.1"
'\\Mac\Home\Documents\TERR\x86_64-w64-mingw32-library\5.1'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* checking MD5 checksums
Could NOT CHECK MD5 CHECKSUMS (probably no nlme/MD5 file)
* installing *binary* package mgcv from "C:\\TEMP\\TERR_06cc00291\\downloaded_packages\\mgcv_1.8-33.zip" to "\\\\Mac\\Home\\Documents\\TERR\\x86_64-w64-mingw32-library\\5.1"
'\\Mac\Home\Documents\TERR\x86_64-w64-mingw32-library\5.1'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* checking MD5 checksums
Could NOT CHECK MD5 CHECKSUMS (probably no mgcv/MD5 file)
* installing *binary* package cluster from "C:\\TEMP\\TERR_06cc00291\\downloaded_packages\\cluster_2.1.0.zip" to "\\\\Mac\\Home\\Documents\\TERR\\x86_64-w64-mingw32-library\\5.1"
'\\Mac\Home\Documents\TERR\x86_64-w64-mingw32-library\5.1'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* checking MD5 checksums
Could NOT CHECK MD5 CHECKSUMS (probably no cluster/MD5 file)
* installing *binary* package MASS from "C:\\TEMP\\TERR_06cc00291\\downloaded_packages\\MASS_7.3-52.zip" to "\\\\Mac\\Home\\Documents\\TERR\\x86_64-w64-mingw32-library\\5.1"
'\\Mac\Home\Documents\TERR\x86_64-w64-mingw32-library\5.1'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* checking MD5 checksums
Could NOT CHECK MD5 CHECKSUMS (probably no MASS/MD5 file)
* installing *binary* package permute from "C:\\TEMP\\TERR_06cc00291\\downloaded_packages\\permute_0.9-5.zip" to "\\\\Mac\\Home\\Documents\\TERR\\x86_64-w64-mingw32-library\\5.1"
'\\Mac\Home\Documents\TERR\x86_64-w64-mingw32-library\5.1'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* checking MD5 checksums
Could NOT CHECK MD5 CHECKSUMS (probably no permute/MD5 file)
* installing *binary* package vegan from "C:\\TEMP\\TERR_06cc00291\\downloaded_packages\\vegan_2.5-6.zip" to "\\\\Mac\\Home\\Documents\\TERR\\x86_64-w64-mingw32-library\\5.1"
'\\Mac\Home\Documents\TERR\x86_64-w64-mingw32-library\5.1'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* checking MD5 checksums
Could NOT CHECK MD5 CHECKSUMS (probably no vegan/MD5 file)
这是我的版本信息:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64,mingw32
status
major 3
minor 6.2
year 2020
month 05
day 20
svn rev 77560
language TERR
version.string TIBCO Enterprise Runtime for R version 5.1.0
(2020-05-20)
nickname Hale Hydra
TERR.version 5.1.0
TERR.edition Developer Edition
TERR.svn.rev 25477
build V131
compiler Intel
compiler.version Intel(R) C++ Intel(R) 64 Compiler XE for
applications running on Intel(R) 64,Version
15.0.3.208 Build 20150407
compiler.flags /W3 /Qdiag-error:63 /EHsc /D_SECURE_SCL=0 /MT /O3
/Qipo /Qinline-factor=100 /DNDEBUG
configuration Release
os.printable Microsoft Windows
use.mkl TRUE
use.openmp TRUE
这是几个系统命令的输出:
Sys.getenv('PATH')
[1] "C:\\rtools40\\usr\\bin;C:\\Program Files\\TIBCO\\terrde51\\bin\\x64;C:\\Program Files (x86)\\Parallels\\Parallels Tools\\Applications;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;${RTOOLS40_HOME}\\usr\\bin;C:\\rtools40\\mingw32\\bin;C:\\Users\\adi\\AppData\\Local\\Microsoft\\WindowsApps;"
> system('where make')
C:\rtools40\usr\bin\make.exe
> Sys.which("ls.exe")
ls.exe
"C:\\rtools40\\usr\\bin\\ls.exe"
> Sys.which("gcc.exe")
gcc.exe
"C:\\rtools40\\mingw32\\bin\\gcc.exe"
我还尝试将mingw32更改为mingw64。
对于如何解决此问题,我将不胜感激!
解决方法
您使用的Rtools版本错误。
来自https://cloud.r-project.org/bin/windows/Rtools/:
此文档是关于rtools40的,rtools40是R 4.0.0及更高版本的当前版本。有关可与R 3.6.3或更早版本一起使用的Rtools早期版本的信息,请访问this page。
您有两种方法可以解决此问题:
-
将R升级到R-4.0或更高版本。如果愿意,您可以卸载R-3.6,但是只要您的工具使用正确版本的R-4或更高版本,就没关系了(您可以并行安装R版本通常不会有太大问题)。
-
降级到Rtools35。在可以保留Rtools40的同时,您需要确保R看到的
PATH
不包括Rtools40,这可以在env-vars的系统配置中完成。您的~/.Rprofile
/~/.Renviron
,或这两个文件的项目专用版本中。 (或者手动,每次...您...开始... R。)
这听起来像是您拥有控制和管理员权限的计算机,因此除非您有理由继续使用R-3.6.2(例如,与他人系统的兼容性,或者您的项目尚未在R- 4)然后我建议选项1。