【发布时间】:2019-12-11 12:48:09
【问题描述】:
在我同事的计算机上,我无法从源代码安装 R 包。我总是收到一个错误:Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'GMT'。在我自己的电脑上,完全没有问题。
在对此进行研究时,我看到人们使用Sys.setenv(TZ="Europe/London") 修复了发出相同警告的时区问题。这在这里行不通。我还发现了一篇旧帖子,建议将 --without-internal-tzcode 添加到 build_opts,但看起来该选项无法识别(现在?)。
这快把我逼疯了,有什么想法吗?
下面是一个完整的例子:
> Sys.setenv(TZ="Europe/London")
> devtools::install_github("DanielGardiner/EpiFunc")
Downloading GitHub repo DanielGardiner/EpiFunc@master
√ checking for file 'C:\.../DESCRIPTION' ...
- preparing 'EpiFunc':
√ checking DESCRIPTION meta-information ...
Warning in as.POSIXlt.POSIXct(x, tz) : unknown timezone 'GMT'
- checking for LF line-endings in source and make files and shell scripts
- checking for empty or unneeded directories
- building 'EpiFunc_0.0.0.9000.tar.gz'
Installing package into ‘C:/Users/.../Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
* installing *source* package 'EpiFunc' ...
Error in as.POSIXlt.POSIXct(x, tz) :
(converted from warning) unknown timezone 'GMT'
ERROR: installing package DESCRIPTION failed for package 'EpiFunc'
* removing 'C:/Users/.../Documents/R/win-library/3.5/EpiFunc'
In R CMD INSTALL
Error: Failed to install 'EpiFunc' from GitHub:
(converted from warning) installation of package ‘C:/.../EpiFunc_0.0.0.9000.tar.gz’ had non-zero exit status
这是在 Windows 10 上,R 版本为 3.5.3。
【问题讨论】: