R Package installation on centOS 7 Server - http error - r

I am struggling to get a package installation via "install.packages("packagename") working on a centOS server using the latest R-Release. The server was setup with R Studio Server Pro.
Internet access is working in general. Package download works also, but after the download, the final installation of the package fails with the following error code:
Error: 163:6: unexpected '/'
163: http:/
I already checked that no requests are blocked with our firewall/proxy. The installation fails from within R Studio, R sessions itself and with all users on the server. It also fails for the central library and the users personal libraries.
Do you have any ideas what the issue might be?
Thanks
Christoph

Related

I cannot connect to shinyapps.io Publishing Account in R Studio. I see an error

I am not able to connect to my Publishing account on R studio.
I go to the path Tools -> Global Options -> Publishing -> Connect
I choose ShinyApps.io and I paste the command that I copied from shinyapps.io dashboard (command from STEP 2 – AUTHORIZE ACCOUNT)
I click on Connect Account but I see this error
I tried connecting from R Studio Console using rsconnect::setAccountInfo(name, token, secret) and I got the below error.
"Error in rbind(info, getNamespaceInfo(env, "S3methods")) :
number of columns of matrices must match (see arg 2)"
I tried connecting by disabling Firewall. It did not work.
I have tried looking online for other troubleshooting steps but I could not understand what the actual issue is.
Can you please help me?
I am using R studio Version 1.3.959 and R version 3.5.2
Check the error when you click connect.
It shows:
Error in the library.dynam(lib, package, package.lib):
DLL ‘openssl’ not found: maybe not installed for this architecture?
This error follows the instruction i.e install the given package. In my case 'OpenSSL' was missing so I installed it and it worked.

Error by using Rinno to deploy R shiny app as a standalone application

I applied Rinno to make an executable Shiny-App which should work locally. However, after running setup_myapp.exe to generate an executable app I got an !
Any idea what could be the reason?
This error is generated when the app cannot connect to the internet. Unless you package all of the dependencies into the RInno installation, the app needs an internet connection to install them from CRAN. It can also be caused by company firewall policies or simply an offline computer.
In RInno 0.3.0 or greater, this error is resolved because it will package all dependencies as windows binaries and deliver them with the .exe (no need for an internet connection on the installing computer).

How to redirect R to local repository?

I have rstudio connected with rconnect (both are rstudio products or tools) on Linux OS. When i try to publish shiny application documents (app.R) from rstudio, process or log says:
Installing required R packages with 'packrat::restore()'....
Curl: (6) Couldn't resolve host 'cran.rstudio.com'
I don't want R to go outside (like cran.rstudio.com) to find any R packages since i have R packages already installed.
Question: What is the setup or configuration i can perform to tell rstudio or rconnect to go to specific directory to find packages if require?

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.
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.
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
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?
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

RStudio package Installation

I had posted a few days earlier about issues in installing packages in RStudio here - RStudio Package installation error. However, my question was marked as duplicate, assuming that the solution posted in the comments is actually the best solution.
Although I have the exact same problem as already mentioned, that solution posted by Ian doesn't help. In fact I get a new kind of error. Please see below:
Warning in install.packages :
unable to connect to 'cran.rstudio.com' on port 80.
Warning in install.packages :
unable to connect to 'cran.rstudio.com' on port 80.
Warning in install.packages :
unable to access index for repository http://cran.rstudio.com/bin/windows/contrib/3.1
Warning in install.packages :
unable to connect to 'www.stats.ox.ac.uk' on port 80.
Warning in install.packages :
unable to connect to 'www.stats.ox.ac.uk' on port 80.
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.1
Installing package into ‘C:/Users/avi/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
It looks like a connection issue, rather than an installation issue. If you work in an organisation - such as a university - and are behind their firewall it could, for example, be a proxy issue.
Two workarounds (as I'm not a network specialist):
If you can move your data to a personal computer (i.e. no encryption/data protection issues) try installing R and RStudio on another computer and see if you can install packages (preferably using a different internet connection, e.g. from your home).
You can install packages from source, so you could download the package and install without needing a connection in RStudio. See, for example, this post: How do I install an R package from source?
If these do not help, additional information that would be helpful for others would be a list of the package(S) you're trying to install, where you're trying to connect from and if that has a firewall, and how you're trying to install packages (i.e. what commands are you typing). Additionally, your organisation/institution computer services might be able to help.
Good luck.
I have seen this problem on corporate networks where this access method is blocked. One solution is to try RStudio as it uses a different method to install packages and may work for your case.
Do these steps :
Tools -> Global Options -> Packages and uncheck the "Use Internet Explorer library/proxy for HTTP".
Restart R ,and it should work
I've had a similar error. That's what I did to fix it:
Tried to install RODBC -> install.packages("RODBC")
Got a failed to connect to 'cran.r-project.org' on port 80." error message
Used the setInternet2(TRUE) command to force it to use my Internet Explorer proxy config
You can check if the command has worked by typing setInternet2(NA). If it returns [1] TRUE, it's working
In some cases, that should be enough (just run the install.packages again). For me, it wasn't (my proxy server requires a password)
The error that I got after trying to run the install.packages was 407 Proxy Authentication Required
To get rid of this last error message, I had to manually configure my proxy credentials. For that, you will need to run Sys.setenv( "http_proxy"="http://<username>:<password>#<proxy-host>:<port>" ) a real life code should look like this one Sys.setenv( "http_proxy"="http://user:password#192.127.100.32:80" )
After that, I tried to install my packages again end it worked perfectly.
If you can't make it work even after that, you can still download the package using your browser and install it locally.
install.packages( file.choose(), repos=NULL )
The file.choose() will prompt you for the name of the downloaded package file.
This link helped me A LOT with this soluction.

Resources