Unable to deploy with issues around R.oo and mailR


I am trying to deploy an app with rsconnect within my employer. There is a package 'mailR' that I need to use and it seems to impede the deployment. It works fine when I do test within Rstudio. But the deployment shows the following errors. And if I comment this package out (and its related functions), the deployment goes smoothly. I am wondering if anyone could advise?

[Connect] 2020/03/15 22:46:49.704694549 Installing R.oo (1.23.0) ... 
[Connect] 2020/03/15 22:51:28.124416955 curl: (7) Failed to connect to 2600:9000:2191:8200:6:c2d3:f940:93a1: Network is unreachable
[Connect] 2020/03/15 22:56:06.558514048 curl: (7) Failed to connect to 2600:9000:20aa:2800:6:c2d3:f940:93a1: Network is unreachable
[Connect] 2020/03/15 23:00:44.973877828 curl: (7) Failed to connect to 2600:9000:20aa:4000:6:c2d3:f940:93a1: Network is unreachable
[Connect] 2020/03/15 23:00:44.975500120 Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
[Connect] 2020/03/15 23:00:44.975511199   'curl' call had nonzero exit status
[Connect] 2020/03/15 23:00:54.365814633 curl: (7) Failed to connect to 2600:9000:201e:1800:6:c2d3:f940:93a1: Network is unreachable
[Connect] 2020/03/15 23:01:04.753761348 curl: (7) Failed to connect to 2600:9000:201e:600:6:c2d3:f940:93a1: Network is unreachable
[Connect] 2020/03/15 23:01:15.143433583 curl: (7) Failed to connect to 2600:9000:201e:1800:6:c2d3:f940:93a1: Network is unreachable
[Connect] 2020/03/15 23:01:25.530673302 curl: (7) Failed to connect to 2600:9000:201e:2c00:6:c2d3:f940:93a1: Network is unreachable
[Connect] 2020/03/15 23:01:35.918769504 curl: (7) Failed to connect to 2600:9000:201e:7e00:6:c2d3:f940:93a1: Network is unreachable
[Connect] 2020/03/15 23:01:36.921067480 FAILED
[Connect] 2020/03/15 23:01:36.921771424 Error in getSourceForPkgRecord(pkgRecord, srcDir(project), availablePackagesSource(repos = repos), : Failed to retrieve package sources for R.oo 1.23.0 from CRAN (internet connectivity issue?)
[Connect] 2020/03/15 23:01:36.921790290 
[Connect] 2020/03/15 23:01:36.921836321 Unable to fully restore the R packages associated with this deployment.
[Connect] 2020/03/15 23:01:36.921838591 Please review the preceding messages to determine which package
[Connect] 2020/03/15 23:01:36.921847780 encountered installation difficulty and the cause of the failure.
[Connect] 2020/03/15 23:01:36.921849100 
[Connect] 2020/03/15 23:01:36.921862656 Some typical reasons for package installation failures:
[Connect] 2020/03/15 23:01:36.921864075   * A system library needed by the R package is not installed.
[Connect] 2020/03/15 23:01:36.921872253     Some of the most common package dependencies are cataloged at:
[Connect] 2020/03/15 23:01:36.921873421     https://github.com/rstudio/shinyapps-package-dependencies
[Connect] 2020/03/15 23:01:36.921883468 
[Connect] 2020/03/15 23:01:36.921884666   * The R package requires a newer version of R.
[Connect] 2020/03/15 23:01:36.921893950 
[Connect] 2020/03/15 23:01:36.921895129   * The C/C++ compiler is outdated. This is often true for packages
[Connect] 2020/03/15 23:01:36.921907354     needing C++11 features.
[Connect] 2020/03/15 23:01:36.921908683 
[Connect] 2020/03/15 23:01:36.921917408   * The R package is Windows-only or otherwise unavailable for this
[Connect] 2020/03/15 23:01:36.921918786     operating system.
[Connect] 2020/03/15 23:01:36.921928309 
[Connect] 2020/03/15 23:01:36.921929461   * The package is housed in a private repository that requires
[Connect] 2020/03/15 23:01:36.921938341     authentication to access. For more details on this, see:
[Connect] 2020/03/15 23:01:36.921939619     https://docs.rstudio.com/connect/admin/package-management.html#private-repositories
[Connect] 2020/03/15 23:01:36.921949472 
[Connect] 2020/03/15 23:01:36.921950672 The package description and documentation will list system requirements
[Connect] 2020/03/15 23:01:36.921960525 and restrictions.
[Connect] 2020/03/15 23:01:36.921961738 
[Connect] 2020/03/15 23:01:36.921970360 Please contact your RStudio Connect administrator for further help
[Connect] 2020/03/15 23:01:36.921977463 resolving this issue.
[Connect] Build error: exit status 1
Application deployment failed with error: exit status 1
Warning messages:
1: invalid uid value replaced by that for user 'nobody' 
2: invalid gid value replaced by that for user 'nobody'

I have installed that "R.oo" and "R.methodsS3" packages in RStudio (server one) after reading from Stack Overflow that these two are dependency package for "mailR". But the same error above persists.



Welcome to the RStudio community!

I'm not an expert on server stuff, but I know from experience that often times deploying R scripts or Shiny apps on a company server will lead to errors as these servers restrict code to download stuff from the internet or even connect to it (as a safety precaution).

It seems that indeed this could be the case, so you might want to ask the IT team that governs the servers if there are restrictions on downloading. At my workplace, R packages or new R versions need to be downloaded and installed by the IT team on the server.

Hope this helps,

Hi PJ,

Thanks for your advice. It is indeed the issue that you described. I checked with IT department and had them reinstall all the packages to the server for me and it works. It is due to internet traffic restriction at my workplace.


1 Like

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