首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >R-3.6上的RDCOMClient安装故障

R-3.6上的RDCOMClient安装故障
EN

Stack Overflow用户
提问于 2019-07-04 02:23:55
回答 5查看 2.7K关注 0票数 4

我无法使用R-3.6安装RDCOMClient

一些背景知识: RDCOMClient在我的R-3.51实例中工作,我需要使用3.6,并且我需要使用RDCOMClient来与我桌面的Outlook进行交互。mailR和sendmailR目前不是一个选项。

我试过了:

代码语言:javascript
复制
>install.packages("RDCOMClient")
Installing package into ‘C:/Users/<user>/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘RDCOMClient’ is not available (for R version 3.6.0)
代码语言:javascript
复制
> library("devtools")
> install_github('omegahat/RDCOMClient')
Error: Failed to install 'unknown package' from GitHub:
  Timeout was reached: Connection timed out after 10000 milliseconds
代码语言:javascript
复制
> install.packages("RDCOMClient", repos = "http://www.omegahat.org/R")
Installing package into ‘C:/Users/<users>/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository http://www.omegahat.org/R/src/contrib:
  cannot open URL 'http://www.omegahat.org/R/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘RDCOMClient’ is not available (for R version 3.6.0)
Warning in install.packages :
  unable to access index for repository http://www.omegahat.org/R/bin/windows/contrib/3.6:
  cannot open URL 'http://www.omegahat.org/R/bin/windows/contrib/3.6/PACKAGES'
代码语言:javascript
复制
> install.packages("RDCOMClient", repos = "http://www.omegahat.net/R")
Installing package into ‘C:/Users/<user>/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository http://www.omegahat.net/R/bin/windows/contrib/3.6:
  cannot open URL 'http://www.omegahat.net/R/bin/windows/contrib/3.6/PACKAGES'
Package which is only available in source
  form, and may need compilation of
  C/C++/Fortran: ‘RDCOMClient’
installing the source package ‘RDCOMClient’

trying URL 'http://www.omegahat.net/R/src/contrib/RDCOMClient_0.93-0.tar.gz'
Content type 'application/x-gzip' length 49509 bytes (48 KB)
downloaded 48 KB

* installing *source* package 'RDCOMClient' ...
** using staged installation
** libs

*** arch - i386
C:/Rtools/mingw_32/bin/g++  -I"C:/PROGRA~1/R/R-36~1.0/include" -DNDEBUG -D_GNU_ -DNO_PYCOM_IPROVIDECLASSINFO -I.      -Wno-deprecated    -O2 -Wall  -mtune=generic -c COMError.cpp -o COMError.o
COMError.cpp:347:0: warning: "_countof" redefined
 #define _countof(array) (sizeof(array)/sizeof(array[0]))
 ^
In file included from C:/Rtools/mingw_32/i686-w64-mingw32/include/combaseapi.h:129:0,
                 from C:/Rtools/mingw_32/i686-w64-mingw32/include/objbase.h:14,
                 from C:/Rtools/mingw_32/i686-w64-mingw32/include/ole2.h:17,
                 from C:/Rtools/mingw_32/i686-w64-mingw32/include/wtypes.h:12,
                 from C:/Rtools/mingw_32/i686-w64-mingw32/include/winscard.h:10,
                 from C:/Rtools/mingw_32/i686-w64-mingw32/include/windows.h:97,
                 from RCOMObject.h:23,
                 from COMError.cpp:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/stdlib.h:299:0: note: this is the location of the previous definition
 #define _countof(_Array) sizeof(*__countof_helper(_Array))
 ^
In file included from COMError.cpp:1:0:
RCOMObject.h: In member function 'virtual ULONG RCOMObject::Release()':
RCOMObject.h:61:50: warning: deleting object of abstract class type 'RCOMObject' which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]
                                           delete this;
                                                  ^
COMError.cpp: In function 'void GetScodeString(HRESULT, LPTSTR, int)':
COMError.cpp:371:39: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'HRESULT {aka long int}' [-Wformat=]
  sprintf(buf, ("OLE error 0x%08x"), hr);
                                       ^
COMError.cpp: In function 'HRESULT checkErrorInfo(IUnknown*, HRESULT, SEXPREC**)':
COMError.cpp:409:51: warning: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'HRESULT {aka long int}' [-Wformat=]
   fprintf(stderr, "<checkErrorInfo> %X \n", status);
                                                   ^
C:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-36~1.0/include" -DNDEBUG -D_GNU_ -DNO_PYCOM_IPROVIDECLASSINFO -I.         -O3 -Wall  -std=gnu99 -mtune=generic -c RUtils.c -o RUtils.o
C:/Rtools/mingw_32/bin/g++  -I"C:/PROGRA~1/R/R-36~1.0/include" -DNDEBUG -D_GNU_ -DNO_PYCOM_IPROVIDECLASSINFO -I.      -Wno-deprecated    -O2 -Wall  -mtune=generic -c connect.cpp -o connect.o
connect.cpp: In function 'HRESULT R_getCOMArgs(SEXP, DISPPARAMS*, DISPID*, int, int*)':
connect.cpp:405:10: warning: variable 'hr' set but not used [-Wunused-but-set-variable]
  HRESULT hr;
          ^
C:/Rtools/mingw_32/bin/g++  -I"C:/PROGRA~1/R/R-36~1.0/include" -DNDEBUG -D_GNU_ -DNO_PYCOM_IPROVIDECLASSINFO -I.      -Wno-deprecated    -O2 -Wall  -mtune=generic -c converters.cpp -o converters.o
In file included from converters.cpp:1:0:
RCOMObject.h: In member function 'virtual ULONG RCOMObject::Release()':
RCOMObject.h:61:50: warning: deleting object of abstract class type 'RCOMObject' which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]
                                           delete this;
                                                  ^
converters.cpp: In function 'SEXPREC* R_convertDCOMObjectToR(VARIANT*)':
converters.cpp:365:11: warning: variable 'hr' set but not used [-Wunused-but-set-variable]
   HRESULT hr;
           ^
C:/Rtools/mingw_32/bin/g++ -shared -s -static-libgcc -o RDCOMClient.dll tmp.def COMError.o RUtils.o connect.o converters.o -lole32 -loleaut32 -luuid -LC:/PROGRA~1/R/R-36~1.0/bin/i386 -lR
COMError.o:COMError.cpp:(.text+0x2b3): undefined reference to `vtable for RCOMObject'
COMError.o:COMError.cpp:(.text+0x4c3): undefined reference to `vtable for RCOMObject'
COMError.o:COMError.cpp:(.text$_ZN10RCOMObject7ReleaseEv+0x19): undefined reference to `vtable for RCOMObject'
converters.o:converters.cpp:(.text+0x175d): undefined reference to `vtable for RCOMObject'
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'RDCOMClient'
* removing 'C:/Users/<user>/Documents/R/win-library/3.6/RDCOMClient'
Warning in install.packages :
  installation of package ‘RDCOMClient’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\<user>\AppData\Local\Temp\Rtmpc7CCRI\downloaded_packages’

我怀疑RDCOMClient不支持3.6,因为它不在这里的目录中:http://www.omegahat.net/R/bin/windows/contrib/,但我想在继续之前,我想我应该在这里尝试一下。

我能做些什么让它工作吗?

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2019-09-05 16:47:54

事实并非如此,RDCOMClient不支持R3.6。它只是(还没有)用3.6x编译,并被放在存储库"http://www.omegahat.net/R/bin/windows/contrib/3.6/“中当前版本的子目录中。然而,使用R3.5x编译的0.93-0版本与R3.6x完全兼容,只需从3.5目录"http://www.omegahat.net/R/bin/windows/contrib/3.5.1/“下载并以压缩格式从本地PC安装即可。

或者直接做

代码语言:javascript
复制
url <- "http://www.omegahat.net/R/bin/windows/contrib/3.5.1/RDCOMClient_0.93-0.zip"
install.packages(url, repos=NULL, type="binary")
票数 8
EN

Stack Overflow用户

发布于 2021-09-09 06:11:32

这对我很有效

代码语言:javascript
复制
library("devtools")
install_github('omegahat/RDCOMClient')
票数 1
EN

Stack Overflow用户

发布于 2019-07-16 01:20:48

RDCOMClient目前似乎不支持R3-6。要解决此问题,我必须切换到选项中的R3.51版本,以运行RDCOMClient并发送电子邮件。

这不是一个理想的解决方案,但在他们发布更新版本之前将会有效。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56876003

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档