cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

R install - cannot open URL

jenshumrich
New Contributor III

Neither standard nor non standard repo seem available. Any idea how to debug/fix this?

 

%r
install.packages("gghighlight", lib="/databricks/spark/R/lib", repos = "http://cran.us.r-project.org")
Warning: unable to access index for repository http://cran.us.r-project.org/src/contrib:
  cannot open URL 'http://cran.us.r-project.org/src/contrib/PACKAGES'
Warning: package ‘gghighlight’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

jenshumrich
New Contributor III
%sh
nc -zv cran.us.r-project.org 80 

It was a network issue. These lines above proved it and the network administrators had to open the IPs.

View solution in original post

2 REPLIES 2

Kaniz
Community Manager
Community Manager

Hi @jenshumrich

  • Ensure that you’ve spelled the package name correctly. Package names are case-sensitive in R, so make sure it matches exactly.
  • Check which repositories R is using to search for packages. You can do this by typing setRepositories() in the R console. By default, CRAN (the Comprehensive R Archive Network) should be selected. If not, you can add it by modifying your Rprofile.site file.
  • Retrieve a list of all available packages using available.packages(). This will help you determine if the package is indeed available. You can also use the data viewer to examine the matrix of available packages.
  • Sometimes the binary version of a package is available, but the source version is not. You can turn off this check by setting options(install.packages.check.source = "no").
  •  If none of the above steps work, consider updating your R version. Older versions may not have certain packages available. You can update your R version through RStudio by going to Tool > Global Options > R version and selecting “Use your machine’s default version of R.”

Let me know if any of these steps resolve the issue, or if you need further assistance!

jenshumrich
New Contributor III
%sh
nc -zv cran.us.r-project.org 80 

It was a network issue. These lines above proved it and the network administrators had to open the IPs.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!