【问题标题】:RQuantLib won't load when deploying a shiny app部署闪亮的应用程序时不会加载 RQuantLib
【发布时间】:2019-04-20 17:25:09
【问题描述】:

我在部署需要 RQuantLib 包的闪亮应用程序时遇到问题。当我运行我的应用程序时,一切正常,即使是需要 RQuantLib 包的部分。但是,在部署应用程序时,该过程在构建包 RQuantLib 时停止。

当我将“library(RQuantLib)”行放入 cmets 时,可以部署应用程序,但由于使用此包,我显然遗漏了我的部分。

这是错误:

[2018-11-17T22:26:33.546919933+0000] Building R package: RQuantLib (0.4.5)
/mnt/packages/build /mnt
* installing to library ‘/opt/R/3.5.0/lib/R/library’
* installing *source* package ‘RQuantLib’ ...
** package ‘RQuantLib’ successfully unpacked and MD5 sums checked
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for R... yes
checking for quantlib-config... yes
configure: WARNING: RQuantLib requires QuantLib (>= 1.8.0).
configure: error: Please upgrade to a current version.
ERROR: configuration failed for package ‘RQuantLib’
* removing 
‘/opt/R/3.5.0/lib/R/library/RQuantLib’################################# End 
Task Log ################################# 
Erreur : Unhandled Exception: Child Task 565972976 failed: Error building 
image: Error building RQuantLib (0.4.5). Build exited with non-zero status: 
1
De plus : Warning message:
Error detecting locale: Error in read.table(file = file, header = header, 
sep = sep, quote = quote, : incomplete final line found by readTableHeader 
on 'raw'
(Using default: en_US) 

提前谢谢你!

【问题讨论】:

    标签: r shiny package quantlib


    【解决方案1】:

    RQuantLib 作者在这里。实际上,我尽量让这一点变得简单:

    configure: WARNING: RQuantLib requires QuantLib (>= 1.8.0).
    configure: error: Please upgrade to a current version.
    ERROR: configuration failed for package ‘RQuantLib’
    

    也不确定您使用的是什么系统(正如您没有说的那样),但 Debian 和 Ubuntu 原生拥有 RQuantLib:sudo apt install r-cran-rquantlib 就足够了。

    否则可能值得重新说明一些显而易见的事情:从源代码构建 RQuantLib 您需要系统上的 RQuantLib如果您从源代码安装,您正在构建(== 安装)。因此安装二进制文件的吸引力——我作为 Debian 维护者提供。

    【讨论】:

    • 感谢您的快速回答。我在windows下,我的应用程序在本地工作,在部署应用程序时出现问题,而不是在运行时出现。我知道安装 QuantLib 是强制性的。但是当托管在 R shinyapps 上时,我怎样才能让它工作呢?
    • 您需要 托管服务器 才能拥有您想要使用的软件包。在这种情况下,闪亮的服务器(运行 Linux)需要有适当的库。也许免费的没有?
    • 我遇到了同样的问题,也在 windows (10) 中工作。 @LRolland 你能找到解决办法吗?
    猜你喜欢
    • 2014-07-31
    • 2016-02-24
    • 2018-11-04
    • 2018-12-02
    • 2018-05-24
    • 1970-01-01
    • 2020-08-07
    • 1970-01-01
    相关资源
    最近更新 更多