ContinuumIO / anaconda-issues

Anaconda issue tracking
648 stars 222 forks source link

Internet routines cannot be loaded when load R Studio from Navigator #4421

Closed Mikejs2178 closed 7 years ago

Mikejs2178 commented 7 years ago

Using Anaconda Navigator 1.6.3, R Studio version 1.0.153 and R version 3.4.1. MacBook Air Mac OS version 10.12.6

When launch R Studio with Navigator, I get the following error: Error in tools::startDynamicHelp() : internet routines cannot be loaded This R Studio was installed via conda with R Essentials When I start an older version of R Studio outside of Anaconda Navigator (i.e. a Version of Rstudio I had before I installed the Anaconda version of R Studio) I do not get this problem

mregensberg commented 7 years ago

+1

update: separately installed RStudio + R 3.4.1 works fine.

slinnarsson commented 7 years ago

I get a similar error on a clean install of Anaconda 4.4.0 after doing conda install rpy2. This is on Mac OS Sierra, and the R version I get is 3.4.1. Specifically, when trying to install a package, I get an error:

> source("http://bioconductor.org/biocLite.R")

Error in file(filename, "r", encoding = encoding) : 
  internet routines cannot be loaded
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
  unable to load shared object '/Users/sten/anaconda3/lib/R/modules//internet.so':
  dlopen(/Users/sten/anaconda3/lib/R/modules//internet.so, 6): Library not loaded: @rpath/libssh2.1.dylib
  Referenced from: /Users/sten/anaconda3/lib/R/modules//internet.so
  Reason: image not found

Note that @rpath has nothing to do with R, but is a mechanism for finding shared libraries on Mac OS X.

Checking under ~/anaconda3/lib indeed there is no libssh2.1.dylib. After doing

conda install libssh2

it still doesn't work, but now it wants to load another library (libgssapi_krb5.2.2.dylib) which we can get by installing krb5:

conda install krb5

...and this solves the problem! At least on my machine.

In short, it seems there are two dependencies missing from r-base.

mingwandroid commented 7 years ago

Thanks @slinnarsson, I need to get this fixed ASAP.

Mikejs2178 commented 7 years ago

Thanks, this solved the problem.

On Sep 4, 2017, at 6:14 PM, Sten Linnarsson notifications@github.com wrote:

I get a similar error on a clean install of Anaconda 4.4.0 after doing "conda install rpy2". This is on Mac OS Sierra, and the R version I get is 3.4.1:

source("http://bioconductor.org/biocLite.R")

Error in file(filename, "r", encoding = encoding) : internet routines cannot be loaded In addition: Warning message: In file(filename, "r", encoding = encoding) : unable to load shared object '/Users/sten/anaconda3/lib/R/modules//internet.so': dlopen(/Users/sten/anaconda3/lib/R/modules//internet.so, 6): Library not loaded: @rpath/libssh2.1.dylib Referenced from: /Users/sten/anaconda3/lib/R/modules//internet.so Reason: image not found Note that @rpath https://github.com/rpath has nothing to do with R, but is a mechanism for finding shared libraries https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html on Mac OS X.

Checking under ~/anaconda3/lib indeed there is no libssh2.1.dylib. After doing

conda install libssh2 it still doesn't work, but now it wants to load another library (libgssapi_krb5.2.2.dylib) which we can get by installing krb5:

conda install krb5 ...and this solves the problem! At least on my machine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ContinuumIO/anaconda-issues/issues/4421#issuecomment-327033866, or mute the thread https://github.com/notifications/unsubscribe-auth/AbnD8QezKG2ZMZqXnmhR5VopYNZ7ub27ks5sfHY9gaJpZM4O8aaz.

mingwandroid commented 7 years ago

This is open until I fix it properly.

lihp11 commented 7 years ago

Thanks,it solved my problem!!!

mattsears18 commented 7 years ago

thanks @slinnarsson, solved for me.

andreassandhi commented 7 years ago

thanks @slinnarsson, solved for me.

wordbites commented 7 years ago

Thank you @slinnarsson! It solved the problem I've stuck for 2 days!

StealthNameless commented 7 years ago

Hello,

I have tried to fix the internet routines problem as well by copying conda install krb5 into R studio and trying to run it. I revieved the fallowing error messages

Error: unexpected symbol in "conda install" Error: unexpected symbol in "conda install.packages"

I have macOS Sierra 10.12.4, Anaconda Navigator 1.6.2, and R Studio version 3.4.1

Ultimately I am trying to install caTools but I get the faloowing error message

caTools’ is not available (for R version 3.4.1)

All my packages are up to date.

slinnarsson commented 7 years ago

@StealthNameless you need to run the conda comman in your terminal, not inside R studio.

jrumbut commented 7 years ago

@slinnarsson You are a hero.

nickyongzhang commented 7 years ago

@slinnarsson Thank you so much. You make my day.

WallyFAI commented 7 years ago

Awesome @slinnarsson, really saved me. Thank you!

lambdamoses commented 7 years ago

Thank you, @slinnarsson, it solved the problem

zackkatz commented 7 years ago

Thank you @slinnarsson, your solution worked for me.

doronator commented 7 years ago

black magic, but it works!

codykingham commented 7 years ago

When running conda install libssh2, Conda wants to downgrade my Python package to 3.5.4 from 3.6. Which I don't want.

mingwandroid commented 7 years ago

This is a bug in conda.

Please use conda install libssh2 python=3.6

On Mon, Oct 16, 2017 at 2:44 PM, Cody Kingham notifications@github.com wrote:

When running conda install libssh2, Conda wants to downgrade my Python package to 3.5.4. Which I don't want.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ContinuumIO/anaconda-issues/issues/4421#issuecomment-336890892, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_pdGPI3lqV5u37ErG0QMDQGch1wJJBks5ss12_gaJpZM4O8aaz .

codykingham commented 7 years ago

@mingwandroid It works. You're the wind in my sails today. ⛵️

mingwandroid commented 7 years ago

This is fixed properly now. Make sure you are using the latest conda then conda update r-essentials rstudio.

LilySnow commented 6 years ago

@slinnarsson Thanks! Solved for me!

fengwei-li commented 3 years ago

the above suggestions can not solve my problem. however, I fix it through cd ~/anaconda3/lib(your anaconda3 lib PATH) rstudio

thesuperzapper commented 1 month ago

If you are using RStudio Server, you might need to start it with the --rsession-ld-library-path=/opt/conda/lib command line argument.

This is because RStudio ignores the servers LD_LIBRARY_PATH when starting R sessions.