2016-01-14 78 views
3

我在Amazon AWS EC-2上安裝了閃亮服務器(Amazon Linux AMI 2015.09.1(HVM),SSD Volume Type - ami-60b6c60a )。服務器對於Shiny應用程序工作正常,但不會呈現.rmd,即使是示例頁面中的rmd也是如此。即使在示例頁面(安裝了rmarkdown軟件包)中,Shiny-server也不顯示rmarkdown

我只看到了這個錯誤:

Error: error in running command

Error

在HTML:

<div id="__reactivedoc__" class="shiny-html-output shiny-bound-output shiny-output-error">error in running command</div> 

我已經安裝了rmarkdown封裝,它的工作原理罰款Rstudio。 (我爲Rstudio和Shiny服務器使用同一個用戶)。

我不知道如何獲取有關錯誤的更多信息,我沒有看到其他消息。

有人有想法嗎?


最新資訊: 我調查日誌從服務器: 這是在/ var /日誌/閃亮的服務器/輸出:

su: ignore --preserve-environment, it's mutually exclusive to --login. 

Listening on http://127.0.0.1:52294 

/opt/shiny-server/ext/pandoc/pandoc: error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory 
Warning: Error in system: error in running command 
Stack trace (innermost first): 
    97: system 
    96: force 
    95: with_pandoc_safe_environment 
    94: get_pandoc_version 
    93: FUN 
    92: lapply 
    91: find_pandoc 
    90: pandoc_available 
    89: <Anonymous> 
    88: do.call 
    87: contextFunc 
    86: .getReactiveEnvironment()$runWith 
    85: shiny::maskReactiveContext 
    84: reactive reactive({ 
    out <- rmd_cached_output(file, encoding) 
    output_dest <- out$dest 
    if (out$cached) { 
     if (nchar(out$resource_folder) > 0) { 
      shiny::addResourcePath(basename(out$resource_folder), 
       out$resource_folder) 
     } 
     return(out$shiny_html) 
    } 
    if (!file.exists(dirname(output_dest))) { 
     dir.create(dirname(output_dest), recursive = TRUE, mode = "0700") 
    } 
    resource_folder <- knitr_files_dir(output_dest) 
    perf_timer_reset_all() 
    dependencies <- list() 
    shiny_dependency_resolver <- function(deps) { 
     dependencies <<- deps 
     list() 
    } 
    output_opts <- list(self_contained = FALSE, copy_resources = TRUE, 
     dependency_resolver = shiny_dependency_resolver) 
    message("\f") 
    args <- merge_lists(list(input = reactive_file(), output_file = output_dest, 
     output_dir = dirname(output_dest), output_options = output_opts, 
     intermediates_dir = dirname(output_dest), runtime = "shiny"), 
     render_args) 
    result_path <- shiny::maskReactiveContext(do.call(render, 
     args)) 
    if (!dir_exists(resource_folder)) 
     dir.create(resource_folder, recursive = TRUE) 
    shiny::addResourcePath(basename(resource_folder), resource_folder) 
    dependencies <- append(dependencies, list(create_performance_dependency(resource_folder))) 
    write_deps <- base::file(file.path(resource_folder, "shiny.dep"), 
     open = "wb") 
    on.exit(close(write_deps), add = TRUE) 
    serialize(dependencies, write_deps, ascii = FALSE) 
    if (!isTRUE(out$cacheable)) { 
     shiny::onReactiveDomainEnded(shiny::getDefaultReactiveDomain(), 
      function() { 
       unlink(result_path) 
       unlink(resource_folder, recursive = TRUE) 
      }) 
    } 
    shinyHTML_with_deps(result_path, dependencies) 
}) 
    73: doc 
    72: shiny::renderUI 
    71: func 
    70: output$__reactivedoc__ 
    3: <Anonymous> 
    2: do.call 
    1: rmarkdown::run 

的/ opt/shiny-服務器/ EXT/pandoc /我有這些:

-rwxrwxr-x 1 root root 37191008 Feb 3 2014 pandoc 
-rwxrwxr-x 1 root root 38520576 Feb 3 2014 pandoc-citeproc 
drwxrwxr-x 2 root root  4096 Jan 13 15:15 static 
I tried to install "gmp.x86_64", but the results are: 

> yum install gmp.x86_64 
Loaded plugins: priorities, update-motd, upgrade-helper 
amzn-main/latest           | 2.1 kB  00:00 
amzn-updates/latest          | 2.3 kB  00:00 
epel/x86_64/metalink          | 3.0 kB  00:00 
epel/x86_64            | 4.3 kB  00:00 ... 
epel/x86_64/updateinfo         | 715 kB  00:00 
epel/x86_64/primary_db         | 5.8 MB  00:01 
949 packages excluded due to repository priority protections 
Package gmp-6.0.0-11.16.amzn1.x86_64 already installed and latest version 
Nothing to do 

而且仍然沒有工作....也許還有另外一個包? 在我的「/ usr/lib64 /」中我有libgmp.so.10.2.0,但我想我沒有libgmp.so.3。 即使安裝i686版本,仍然是一樣的。

回答

4

我解決了這個問題,幫助從github issues page of shiny-server sjpascual怎麼說,剛安裝的軟件包:COMPAT-gmp4COMPAT-libffi5修復它。

現在工作正常。

+0

對Fedora有什麼建議嗎?我設法安裝'compat-libffi.x86_64 3.0.10-7.fc23',但沒有'compat-gmp4'。 –

+1

不幸的是...也許在Github有人也幫助你。打開一個問題並把你的日誌放在那裏。 –

+0

@bquast,paul-j爲Fedora波紋管提供解決方案。我希望爲你工作。 –

6

於Fedora 23我有同樣的問題

[[email protected] shiny-server]# ldd -d /opt/shiny-server/ext/pandoc/pandoc 
linux-vdso.so.1 (0x00007ffff9eb0000) 
libz.so.1 => /lib64/libz.so.1 (0x00007fc20bd55000) 
librt.so.1 => /lib64/librt.so.1 (0x00007fc20bb4d000) 
libutil.so.1 => /lib64/libutil.so.1 (0x00007fc20b949000) 
libdl.so.2 => /lib64/libdl.so.2 (0x00007fc20b745000) 
libgmp.so.3 => not found 
libffi.so.5 => not found 
libm.so.6 => /lib64/libm.so.6 (0x00007fc20b442000) 
libc.so.6 => /lib64/libc.so.6 (0x00007fc20b081000) 
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc20ae63000) 
/lib64/ld-linux-x86-64.so.2 (0x0000561bb7c14000) 

ln -s /lib64/libffi.so.6.0.2 /lib64/libffi.so.5 
ln -s /lib64/libgmp.so.10.2.0 /lib64/libgmp.so.3 

解決它

+0

太好了,謝謝。我對'ldd'不是很熟悉,我只是像那樣運行那個命令? –

+0

就我而言,由於我已經安裝了'compat-libffi.x86_64 3.0.10-7-fc23',我只需要第二個'ln -s'。 –

1

這是一個老的文章,但萬一有人有類似的問題。您可以嘗試從控制檯安裝RMarkdown包的根,而不是內部RStudio使提供給閃亮服務器軟件包:

sudo su - -c "R -e \"install.packages('rmarkdown', repos='http://cran.rstudio.com/')\"" 

,幫助我得到RMarkdown示例應用程序中測試頁面加載.. 。

相關問題