I just recently installed Shiny Server 1.5.22.1017 on a new RHEL 8.9 server with R-4.3.3, but receive an error loading jsonlite when attempting to load run any app. When I navigate to the main page of Shiny Server it's unable to display the example apps as well.
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/lib64/R/library/jsonlite/libs/jsonlite.so':
/usr/lib64/R/library/jsonlite/libs/jsonlite.so: cannot open shared object file: Operation not permitted
Calls: local ... eval -> eval -> loadNamespace -> library.dynam -> dyn.load
Execution halted
I recompiled jsonlite, but Shiny Server is still unable to load the shared object file.
Here are the installed packages:
> installed.packages()
Package LibPath Version Priority
base "base" "/usr/lib64/R/library" "4.3.3" "base"
base64enc "base64enc" "/usr/lib64/R/library" "0.1-3" NA
boot "boot" "/usr/lib64/R/library" "1.3-29" "recommended"
bslib "bslib" "/usr/lib64/R/library" "0.5.0" NA
cachem "cachem" "/usr/lib64/R/library" "1.0.8" NA
class "class" "/usr/lib64/R/library" "7.3-22" "recommended"
cli "cli" "/usr/lib64/R/library" "3.6.1" NA
cluster "cluster" "/usr/lib64/R/library" "2.1.6" "recommended"
codetools "codetools" "/usr/lib64/R/library" "0.2-19" "recommended"
commonmark "commonmark" "/usr/lib64/R/library" "1.9.0" NA
compiler "compiler" "/usr/lib64/R/library" "4.3.3" "base"
crayon "crayon" "/usr/lib64/R/library" "1.5.2" NA
datasets "datasets" "/usr/lib64/R/library" "4.3.3" "base"
digest "digest" "/usr/lib64/R/library" "0.6.33" NA
ellipsis "ellipsis" "/usr/lib64/R/library" "0.3.2" NA
evaluate "evaluate" "/usr/lib64/R/library" "0.21" NA
fastmap "fastmap" "/usr/lib64/R/library" "1.1.1" NA
fontawesome "fontawesome" "/usr/lib64/R/library" "0.5.1" NA
foreign "foreign" "/usr/lib64/R/library" "0.8-86" "recommended"
fs "fs" "/usr/lib64/R/library" "1.6.2" NA
glue "glue" "/usr/lib64/R/library" "1.6.2" NA
graphics "graphics" "/usr/lib64/R/library" "4.3.3" "base"
grDevices "grDevices" "/usr/lib64/R/library" "4.3.3" "base"
grid "grid" "/usr/lib64/R/library" "4.3.3" "base"
highr "highr" "/usr/lib64/R/library" "0.10" NA
htmltools "htmltools" "/usr/lib64/R/library" "0.5.5" NA
httpuv "httpuv" "/usr/lib64/R/library" "1.6.11" NA
jquerylib "jquerylib" "/usr/lib64/R/library" "0.1.4" NA
jsonlite "jsonlite" "/usr/lib64/R/library" "1.8.7" NA
KernSmooth "KernSmooth" "/usr/lib64/R/library" "2.23-22" "recommended"
knitr "knitr" "/usr/lib64/R/library" "1.43" NA
later "later" "/usr/lib64/R/library" "1.3.1" NA
lattice "lattice" "/usr/lib64/R/library" "0.22-5" "recommended"
lifecycle "lifecycle" "/usr/lib64/R/library" "1.0.3" NA
magrittr "magrittr" "/usr/lib64/R/library" "2.0.3" NA
MASS "MASS" "/usr/lib64/R/library" "7.3-60.0.1" "recommended"
Matrix "Matrix" "/usr/lib64/R/library" "1.6-5" "recommended"
memoise "memoise" "/usr/lib64/R/library" "2.0.1" NA
methods "methods" "/usr/lib64/R/library" "4.3.3" "base"
mgcv "mgcv" "/usr/lib64/R/library" "1.9-1" "recommended"
mime "mime" "/usr/lib64/R/library" "0.12" NA
nlme "nlme" "/usr/lib64/R/library" "3.1-164" "recommended"
nnet "nnet" "/usr/lib64/R/library" "7.3-19" "recommended"
parallel "parallel" "/usr/lib64/R/library" "4.3.3" "base"
promises "promises" "/usr/lib64/R/library" "1.2.0.1" NA
R6 "R6" "/usr/lib64/R/library" "2.5.1" NA
rappdirs "rappdirs" "/usr/lib64/R/library" "0.3.3" NA
Rcpp "Rcpp" "/usr/lib64/R/library" "1.0.11" NA
rlang "rlang" "/usr/lib64/R/library" "1.1.1" NA
rmarkdown "rmarkdown" "/usr/lib64/R/library" "2.23" NA
rpart "rpart" "/usr/lib64/R/library" "4.1.23" "recommended"
sass "sass" "/usr/lib64/R/library" "0.4.7" NA
shiny "shiny" "/usr/lib64/R/library" "1.7.4.1" NA
sourcetools "sourcetools" "/usr/lib64/R/library" "0.1.7-1" NA
spatial "spatial" "/usr/lib64/R/library" "7.3-17" "recommended"
splines "splines" "/usr/lib64/R/library" "4.3.3" "base"
stats "stats" "/usr/lib64/R/library" "4.3.3" "base"
stats4 "stats4" "/usr/lib64/R/library" "4.3.3" "base"
stringi "stringi" "/usr/lib64/R/library" "1.7.12" NA
stringr "stringr" "/usr/lib64/R/library" "1.5.0" NA
survival "survival" "/usr/lib64/R/library" "3.5-8" "recommended"
tcltk "tcltk" "/usr/lib64/R/library" "4.3.3" "base"
tinytex "tinytex" "/usr/lib64/R/library" "0.45" NA
tools "tools" "/usr/lib64/R/library" "4.3.3" "base"
utils "utils" "/usr/lib64/R/library" "4.3.3" "base"
vctrs "vctrs" "/usr/lib64/R/library" "0.6.3" NA
withr "withr" "/usr/lib64/R/library" "2.5.0" NA
xfun "xfun" "/usr/lib64/R/library" "0.39" NA
xtable "xtable" "/usr/lib64/R/library" "1.8-4" NA
yaml "yaml" "/usr/lib64/R/library" "2.3.7" NA
I'm able to load the jsonlite library from the R console without issue:
> library(jsonlite)
>
I didn't change much in the Shiny configuration file:
# Instruct Shiny Server to run applications as the user "shiny"
run_as :HOME_USER: shiny;
sanitize_errors off;
# Define a server that listens on port 80
server {
listen 80;
# Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.
directory_index on;
}
}
The shared object file in question appears to be accessible in the location it's looking:
ls -la /usr/lib64/R/library/jsonlite/libs/
total 412
drwxr-xr-x. 2 root root 25 May 8 16:01 .
drwxr-xr-x. 8 root root 166 May 8 16:01 ..
-rwxr--r--. 1 root root 419976 May 8 16:01 jsonlite.so
Any ideas on troubleshooting? Unfortunately this system is disconnected from the Internet, so it makes it that much more fun.