我开发了一个带有RStudio的应用程序。在我的笔记本电脑上它工作得很好,但是当我尝试将它部署到Shiny服务器时,我收到了一个错误。 在我检索的消息下面。我安装了rNVD3和rjson包,根据消息似乎有问题。 有人可以帮忙吗?
################################ Begin Task Log ################################
[2015-12-23T19:33:50.691657809+0000] Installing R package: registry (0.3)
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *binary* package <U+2018>registry<U+2019> ...
* DONE (registry)
[2015-12-23T19:33:50.992761317+0000] Installing R package: digest (0.6.8)
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *binary* package <U+2018>digest<U+2019> ...
* DONE (digest)
[2015-12-23T19:33:51.294593635+0000] Installing R package: whisker (0.3-2)
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *binary* package <U+2018>whisker<U+2019> ...
* DONE (whisker)
[2015-12-23T19:33:51.601777554+0000] Installing R package: scatterplot3d (0.3-36)
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *binary* package <U+2018>scatterplot3d<U+2019> ...
* DONE (scatterplot3d)
[2015-12-23T19:33:51.918131230+0000] Installing R package: xtable (1.8-0)
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *binary* package <U+2018>xtable<U+2019> ...
* DONE (xtable)
[2015-12-23T19:33:52.230003490+0000] Installing R package: magrittr (1.5)
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *binary* package <U+2018>magrittr<U+2019> ...
* DONE (magrittr)
[2015-12-23T19:33:52.525312212+0000] Installing R package: gridBase (0.4-7)
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *binary* package <U+2018>gridBase<U+2019> ...
* DONE (gridBase)
[2015-12-23T19:33:52.829650380+0000] Installing R package: labeling (0.3)
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *binary* package <U+2018>labeling<U+2019> ...
* DONE (labeling)
[2015-12-23T19:33:53.110608764+0000] Installing R package: htmltools (0.2.6)
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *binary* package <U+2018>htmltools<U+2019> ...
* DONE (htmltools)
[2015-12-23T19:33:53.507345673+0000] Building R package: rNVD3 (0.0.1)
/mnt/packages/build /mnt
Warning in untar2(tarfile, files, list, exdir, restore_times) :
skipping pax global extended headers
* installing to library <U+2018>/usr/local/lib/R/site-library<U+2019>
* installing *source* package <U+2018>rNVD3<U+2019> ...
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called <U+2018>rjson<U+2019>
ERROR: lazy loading failed for package <U+2018>rNVD3<U+2019>
* removing <U+2018>/usr/local/lib/R/site-library/rNVD3<U+2019>
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 120205071 failed: Error building image: Error building rNVD3 (0.0.1). Build exited with non-zero status: 1
答案 0 :(得分:1)
根本原因是rNVD3
包依赖于rjson
包,但未在DESCRIPTION
文件中声明它。当闪亮的服务器尝试为您的应用程序准备环境并且来到rNVD3
时,它无法构建它,因为rjson
尽管是必需的,但它不可用。
这应该由rNVD3
软件包维护者来解决,但是由于该软件包的开发已经停止,这可能永远不会发生。
但我相信解决方案就像添加行
一样简单library('rjson')
位于server.R
文件之上。 R Shiny服务器应该在部署期间进行提取,并确保rjson
在尝试构建rNVD3
之前可用。