mshelomi
mshelomi

Reputation: 61

Installing stringi repeatedly fails

I am trying to install likert, which requires stringi.

install.package("likert") fails to install stringi.

install.package("stringi") from CRAN fails as well:

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/stringi_1.7.6.tgz'
Content type 'application/x-gzip' length 14390020 bytes (13.7 MB)
==================================
downloaded 9.3 MB

Warning in install.packages :
  downloaded length 9800943 != reported length 14390020
Warning in install.packages :
  URL 'https://cran.rstudio.com/bin/macosx/contrib/4.2/stringi_1.7.6.tgz': Timeout of 60 seconds was reached
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  download from 'https://cran.rstudio.com/bin/macosx/contrib/4.2/stringi_1.7.6.tgz' failed
Warning in install.packages :
  download of package ‘stringi’ failed

I downloaded the package from https://cran.r-project.org/web/packages/stringi/index.html and tried installing: install.packages("~/Desktop/downloads/stringi_1.7.6.tgz", repos = NULL, type = .Platform$pkgType)

But this also failed:

Error: package or namespace load failed for ‘stringi’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/stringi/libs/stringi.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/stringi/libs/stringi.so, 6): Library not loaded: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libR.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/stringi/libs/stringi.so
  Reason: image not found

What is going on? I have the latest version of R and R Studio for Mac.

Upvotes: 2

Views: 1426

Answers (1)

mshelomi
mshelomi

Reputation: 61

I figured it out. The problem was the timeout. It took too long to load. I fixed it by changing the timeout from 60seconds to a larger number:

getOption('timeout')
[1] 60
options(timeout=300)

Upvotes: 4

Related Questions