How do I diagnose “unable to create socket”?

2019-02-18 10:20发布

问题:

Suddenly RStudio is giving me this error when I enter a string on the help search box:

starting httpd help server ...Error in tools::startDynamicHelp() : unable to create socket

I get the same error when I enter the following on the console:

> ?grep

I have updated to the current version of RStudio and was running the current version of R. I tried the same command in R itself and there's no problem.

Maybe coincidentally, when I try to get RStudio to update packages, I get this message:

Warning: unable to access index for repository http://cran.rstudio.com/bin/windows/contrib/3.1
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.1

Here is what RStudio provides in a diagnostics-report file:

19 Jul 2014 17:13:51 [rsession-John Smith] ERROR r error 4 (R code execution error) [errormsg=Error in tools::startDynamicHelp() : unable to create socket|||]; OCCURRED AT: core::Error r::exec::::evaluateExpressionsUnsafe(SEXPREC*, SEXPREC*, SEXPREC**, r::sexp::Protect*) C:\Users\Administrator\rstudio\src\cpp\r\RExec.cpp:145; LOGGED FROM: core::Error session::modules::help::initialize() C:\Users\Administrator\rstudio\src\cpp\session\modules\SessionHelp.cpp:894

I have UNINSTALLED R and RStudio and then re-installed and the problem doesn't go away. Now when I launch RStudio, I get:

Error in tools::startDynamicHelp() : unable to create socket

回答1:

Well, one answer is to just try anything -- even something that appears quite remotely possible. It turns out that that this mysterious and very irritating bug only happens in the 64-bit version of R (within RStudio), not the 32-bit version! Here's how to fix the problem:

Selecting the 32-bit version solves it! RStudio is SO great, it is a huge bummer for its help system to not be working!



标签: r rstudio