Unable to install shiny package on CentOS 7

shiny
package-installation
#1

I am attempting to install Shiny and Shiny Server on a CentOS 7 box, and I appear to be running into some sort of permission issue.

I am using the command below to attempt to install the Shiny Package:

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

It fails at some point while compiling/installing the httpuv package, which apparently is a dependency of Shiny:

/bin/sh: line 4: ./configure: Permission denied
make: *** [libuv/Makefile] Error 126
ERROR: compilation failed for package ‘httpuv’
* removing ‘/usr/lib64/R/library/httpuv’
ERROR: dependency ‘httpuv’ is not available for package ‘shiny’
* removing ‘/usr/lib64/R/library/shiny’

The downloaded source packages are in
	‘/tmp/RtmpDcoZsU/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages("shiny", repos = "https://cran.rstudio.com/") :
  installation of package ‘httpuv’ had non-zero exit status
2: In install.packages("shiny", repos = "https://cran.rstudio.com/") :
  installation of package ‘shiny’ had non-zero exit status

Obviously, there is some sort of permission issue when compiling the httpuv package, but I am not sure what the solution is. Any ideas on how I may be able to solve this issue and install the Shiny package?

0 Likes

#2

Check that your /tmp partition is not mounted with the noexec flag (a common security measure):

$ mount|grep /tmp
/dev/<actual device name here> on /tmp type ext4 (rw,nosuid,nodev,noexec,relatime)

If that is the case, set the TMPDIR to some other location in either your or system Renviron file:

TMPDIR=/some/other/tmp
0 Likes

#3

/tmp was in fact mounted with the noexec flag, and the package installation worked once I added that line to my .Renviron file. Thank you so much!

0 Likes

closed #4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes