[ACCEPTED]-R Shiny Server installation package-shiny-server
The problem is that shiny-server cannot 14 find the packages that you install, because 13 it runs them as a different user called 12
shiny. This is the user is created upon installation 11 of
The easiest (and safest IMHO) way to 10 solve this issue, is to install the required 9 packages using this user account (shiny). This 8 can be done using the following steps.
- Set a password for the
shinyuser account using
sudo passwd shiny, now enter and confirm a password
- Switch to the shiny account using:
su - shiny
- Call up
- Install the required packages, in this case:
Note 7 that if you have rstudio-server installed 6 on the same machine then you can perform 5 steps 2-4 using that interface. Simply go 4 the same domain/ip and use :8787 for the 3 rstudio-server interface instead of :3838 2 for shiny-server.
Adapted from my answer 1 here
I had similar issue. After reading the admin guide, here 6 might be a solution for you.
You are having 5 this error because whoever accessing the 4 app does not have the
shiny package installed. If 3 you do
less /etc/shiny-server/shiny-server.conf and you might notice the following 2 on the first two lines:
# Instruct Shiny Server to run applications as the user "shiny" run_as shiny;
In order to fix the 1 issue, you may do either of the following:
- Switch to user
shinyand install all packages there. e.g.,
su shiny. However, this is going to duplicate your installed libraries for all users.
- A clean way is to always run
shinyfrom another user with all the packages, by editing
/etc/shiny-server/shiny-server.conf. In this case, you may change the second line to
run_as your_username shiny;, so that it looks for your
.libPaths()and then shiny's
.libPaths(). You may also add multiple users here.
I had similar troubles. Worked after I did 2 the following instead of the one line installation 1 of the package:
sudo su R
then in R do:
install.packages('shiny', repos='http://cran.rstudio.com/') library(shiny)
I am also a newbie to Ubuntu and had similar 10 problems. In my case the problem was that 9 R packages were installed in the folders 8 belonging to user 'ubuntu'. However they 7 have to be available to the root.
I changed 6 user to 'root' with the appropriate command 5 and then ran the install.packages function 4 from R
sudo -i R
Hope it will help you on your way. At 3 least your problem is not unique. I found 2 a lot of useful tips by just googling around 1 a bit. E.g.:
More Related questions