How install packages from package.tar.gz on Shiny.Server?

Hi guys,
Could you help me?
I am trying to install one package not hosted on Cran by the file "package.tar.gz".

I am using:

install.packages("D:/home/local/shiny/R/site-library/package.tar.gz", repos = NULL, type = "source").

orHow install packages from package.tar.gz?

sudo su - -c "R -q -e "install.packages('D:/home/local/shiny/R/site-library/package.tar.gz', repos=NULL')""

It does not work on the server but works on my machine. Then, I copied and pasted on server R library the PACKAGE installed folder. I got the Error: cannot open the connection

Thank you

Hello, it sounds like it works on your machine and not on the server because D:/home.../package.tar.gz exists on your machine, but not on the server.

I suggest uploading the package.tar.gz file that exists on your machine to the server, using a command similar to scp package.tar.gz your-server.com:/tmp/package.tar.gz. Then, on the server, run the command sudo su - -c “R -q -e “install.packages('/tmp/package.tar.gz’, repos=NULL’)””