在Databricks中安装RDCOMClient

问题描述

我正在尝试在数据块中安装RDCOMClient,以便可以通过Outlook发送电子邮件

下面是我在集群中的代码

devtools::install_github("omegahat/RDCOMClient")
library(RDCOMClient)

这是我得到的错误

知道为什么会这样吗?

  (converted from warning) installation of package ‘/tmp/Rtmp0TxpWK/file118672a6f234/RDCOMClient_0.94-0.tar.gz’ had non-zero exit status
Downloading GitHub repo omegahat/RDCOMClient@master
Installing package into ‘/databricks/spark/R/lib’
(as ‘lib’ is unspecified)
* installing *source* package ‘RDCOMClient’ ...
** using staged installation
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG     -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-V28x5H/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c COMError.cpp -o COMError.o
In file included from COMError.cpp:1:0:
RCOMObject.h:23:10: Fatal error: windows.h: No such file or directory
 #include <windows.h>
          ^~~~~~~~~~~
compilation terminated.
/usr/lib/R/etc/Makeconf:177: recipe for target 'COMError.o' Failed
make: *** [COMError.o] Error 1
ERROR: compilation Failed for package ‘RDCOMClient’
* removing ‘/databricks/spark/R/lib/RDCOMClient’
Error : Failed to install 'RDCOMClient' from GitHub:
  (converted from warning) installation of package ‘/tmp/Rtmp0TxpWK/file118672a6f234/RDCOMClient_0.94-0.tar.gz’ had non-zero exit status```

解决方法

该库是为在MS Windows上工作而设计的,因此不能在Databricks平台下使用的Linux上使用。

如果您要发送消息,则需要使用特定于您具有Databricks的云的服务:SNS or CES on AWSSendGrid on Azure