Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
288 views
in Technique[技术] by (71.8m points)

windows - Load library failure in R

I was trying to install rtools40 using:

writeLines('PATH="${RTOOLS40_HOME}\usr\bin;${PATH}"', con = "~/.Renviron")

but then (after restarting Rsession) this first error message appeared:

Error: package or namespace load failed for ‘stats’ in inDL(x, as.logical(local), as.logical(now), ...): unable to load shared object 'C:/Program Files/R/R-4.0.3/library/stats/libs/x64/stats.dll': LoadLibrary failure: The specified module could not be found.

During startup - Warning message:

package ‘stats’ in options("defaultPackages") was not found Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object 'C:/Program Files/R/R-4.0.3/library/stats/libs/x64/stats.dll': LoadLibrary failure: The specified module could not be found.

Then, I did:

update.packages(ask=FALSE, checkBuilt=TRUE)

Second error message:

The downloaded sourse packages are in 'C:Usersuser-nameAppDataLocalTempRtmpktiV4dowloaded_packages' Warinin in install.packages(update[instlib==l, "Package"], l, repos = repos, : Error in install.packages(update[instlib == l, "Package"], l, repos = repos, : unable to install packages.

You can appreciate that in this second image it is written that a direction was not writable and is when R asked whether I would have liked to use a personal library and I typed 'YES' but now I have a fatal error.

I tried to install 'stats' package:

library(stats, lib.loc = "C:/Program Files/R/R-4.0.3/library")

And this third error message appeared:

Error: package or namespace load failed for ‘stats’ in inDL(x, as.logical(local), as.logical(now), ...): unable to load shared object 'C:/Program Files/R/R-4.0.3/library/stats/libs/x64/stats.dll': LoadLibrary failure: The specified module could not be found.

Lastly, I have tried to uninstall R and R studio but this problem persist, I have no clue how to change the library location.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...