当我试图在SQL Server中通过外部脚本调用运行UDPIPE时,我得到以下错误。
Msg 39004, Level 16, State 20, Line 31
A 'R' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
Msg 39019, Level 16, State 2, Line 31
An external script error occurred:
Error: package or namespace load failed for 'udpipe':
object 'as.xts' not found whilst loading namespace 'data.table'
In addition: Warning message:
package 'udpipe' was built under R version 4.1.0
Error in execution. Check the output for more information.
Error in eval(ei, envir) :
Error in execution. Check the output for more information.
Calls: runScriptFile -> source -> withVisible -> eval -> eval -> .Call
Execution halted我通常通过将软件包直接安装到R(4.1版)中,然后将它们复制到我的SQL Server R库目录中来安装软件包。它在所有其他包上都工作得很好,但是UDPIPE抛出了这个错误,googling还没有找到解决方案。
注意: Udpipe和data.table在R单机版中运行良好。
任何帮助都将不胜感激。
(我正在运行SQL Server 2019,并将R升级到4.1,这与我的R单机版相匹配)。
发布于 2021-08-27 15:20:47
感谢您的指导。是的,你是对的。这似乎确实是安装了为错误版本的R构建的软件包的结果。唉,删除并重新安装软件包并不能完全修复它,因为似乎有很多“东西”留下了破坏。
对于将来登陆这里的任何人:最终的解决方案是使用SQL 2019安装工具卸载R服务。然后重新安装R服务。最后安装一个干净的R3.5.2实例,在那里安装所有需要的R包,然后复制到SQL R库中。
这似乎清理了由于缺乏更好的术语而“损坏”的所有比特。
https://stackoverflow.com/questions/68925192
复制相似问题