简体   繁体   English

使 rtools40 在 Parallels VM 中的 Windows 10 中的 Rstudio 1.2.5042 和 TERR(Tibco Engine R)上工作

[英]Getting rtools40 to work on Rstudio 1.2.5042 and TERR (Tibco Engine R) in Windows 10 within Parallels VM

EDIT: The problem ended up to be that TERR 5.1.0 is actually based on R 3.6.编辑:问题最终是 TERR 5.1.0 实际上基于 R 3.6。 and therefore Rtools35 was needed.因此需要 Rtools35。 The second problem was that I was trying to install the packages to a network location that was set as default for Rstudio due to the fact that it is installed within Parallels VM.第二个问题是我试图将软件包安装到 Rstudio 默认设置的网络位置,因为它安装在 Parallels VM 中。

I've been struggling with this problem for the last few days.最近几天我一直在努力解决这个问题。 There are many posts on how to solve issues with rtools40, and I read everything I could find, but it still didn't solve this issue.有很多关于如何解决 rtools40 问题的帖子,我阅读了我能找到的所有内容,但仍然没有解决这个问题。 It could be that the issue stems from the fact that I have to use Rstudio and TERR (TIBCO Enterprise Runtime for R =) and not R, and also everything is run within Parallels VM.问题可能源于我必须使用 Rstudio 和 TERR(TIBCO Enterprise Runtime for R =)而不是 R,而且所有内容都在 Parallels VM 中运行。

When installing a package (in this case it's Vegan, but also tried devtools, tidyverse and others) I get these are the errors:安装软件包时(在这种情况下它是 Vegan,但也尝试了 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)

This is my version info:这是我的版本信息:

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

And this is the output from several sys.which commands:这是几个 sys.which 命令的输出:

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"

I also tried changing the mingw32 to mingw64.我也尝试将 mingw32 更改为 mingw64。

I would appreciate any suggestion as to how this can be solved!对于如何解决此问题的任何建议,我将不胜感激!

You have the wrong version of Rtools.您的 Rtools 版本错误。

From https://cloud.r-project.org/bin/windows/Rtools/ :https://cloud.r-project.org/bin/windows/Rtools/

This documentation is about rtools40, the current version used for R 4.0.0 and newer.本文档是关于 rtools40,当前用于 R 4.0.0 和更新版本的版本。 For information about previous versions of Rtools that can be used with R 3.6.3 or older, please visit this page .有关可用于 R 3.6.3 或更早版本的 Rtools 早期版本的信息,请访问此页面

You have two ways to remedy this:您有两种方法可以解决此问题:

  1. Upgrade R to be R-4.0 or newer.将 R 升级为 R-4.0 或更新版本。 You might uninstall R-3.6 if you choose, but as long as your tools use the correct version of R-4 or newer, then it doesn't matter (you can have parallel version of R typically without much problem).如果您愿意,您可以卸载 R-3.6,但只要您的工具使用正确版本的 R-4 或更新版本,就没有关系(您通常可以拥有 R 的并行版本,不会有太大问题)。

  2. Downgrade to Rtools35.降级到 Rtools35。 While you can keep Rtools40 around, you'll need to make sure that the PATH that R sees does not include Rtools40, which can be accomplished in the system configuration on env-vars, in your ~/.Rprofile / ~/.Renviron , or in a project-specific version of those two files.虽然您可以保留 Rtools40,但您需要确保 R 看到的PATH不包括 Rtools40,这可以在 env-vars 的系统配置中完成,在您的~/.Rprofile / ~/.Renviron ,或者在这两个文件的项目特定版本中。 (Or manually, every ... time ... you ... start ... R.) (或者手动,每次……每次……你……开始……R。)

It sounds like it's a computer on which you have control and admin rights, so unless you have reason to stay on R-3.6.2 (eg, compatibility with others' systems, or your projects are not yet tested on R-4) then I'd recommend option 1.这听起来像是一台您拥有控制权和管理员权限的计算机,因此除非您有理由继续使用 R-3.6.2(例如,与其他系统的兼容性,或者您的项目尚未在 R-4 上进行测试),否则我推荐选项1。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM