Skip to content
Advertisement

Unable to deploy Shiny application on Shiny Server in Linux VM

I have been trying to deploy my shiny application in shiny server which i have installed on Linux VM (RHEL 6.5, 64 bit) by following the instructions given in this site

The server is started successfully but i get the following when i try to access the sample application provided as a part of the shiny server.

Error in dyn.load(file, DLLpath = DLLpath, …) :
unable to load shared object ‘/usr/lib64/R/library/Rcpp/libs/Rcpp.so’:
/usr/lib64/R/library/Rcpp/libs/Rcpp.so: invalid ELF header

In addition: Warning message: package ‘shiny’ was built under R version 3.3.0
Error: package or namespace load failed for ‘shiny’ Execution halted I installed all the required packages without any error still i got this exception when i tried to access the sample application.

The following are the steps i followed to install shiny server.

  1. Installed R. In my office EPEL repository is blocked since it is maintained by a third party organization. So I downloaded the rpm file for R from EPEL website and installed the same using the rpm command.

  2. Next i downloaded the shiny package from the CRAN repository and installed the same using the following command R CMD INSTALL shiny_0.13.2.tgz

  3. Finally i downloaded and installed the shiny server RPM file.

The server was successfully installed and started without any errors, yet i get the above error when trying to access the application deployed in the server.

I googled a lot for this error but could not find much. Has anybody else faced this issue? Could someone help me out with this?

Advertisement

Answer

I found out the issue. I installed all the packages as root user but shiny server runs under a different username “shiny”. In order to solve this I started an R session using the following command

sudo R

Then I installed the packages using their source, as my LINUX VM (office machine)did not have internet access. I used the following command for installing the packages from the source. First we need to untar the source and then run the following command.

require(devtools)
install('path-to-the-untared-folder')

The below link helped me in finding out the solution.

R – shiny server on Ubuntu

Advertisement