Installation of packages ‘stringr’ and ‘stringi’ had non-zero exit status
Asked Answered
B

5

12

Please help me to install stringr and stringi packages in R. The result is:

install.packages("stringi")
Installing package into ‘C:/Users/kozlovpy/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
пробую URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/bin/windows/contrib/3.2/stringi_0.5-5.zip'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  не могу открыть URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/bin/windows/contrib/3.2/stringi_0.5-5.zip'
Вдобавок: Предупреждение:
В download.file(url, destfile, method, mode = "wb", ...) :
  'InternetOpenUrl' не удалось: 'Операция прервана по таймауту'
Предупреждение в download.packages(pkgs, destdir = tmpd, available = available,  :
  скачивание пакета ‘stringi’ не удалось

sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Russian_Russia.1251  LC_CTYPE=Russian_Russia.1251    LC_MONETARY=Russian_Russia.1251 LC_NUMERIC=C                   
[5] LC_TIME=Russian_Russia.1251    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] plyr_1.8.2   tools_3.2.2  gtable_0.1.2 Rcpp_0.11.5  grid_3.2.2   digest_0.6.8 proto_0.3-10

I have tried to follow recomendations in link How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning? , and result is the next (not positive):

  1. Name is OK
  2. Just set all possible repositories
  3. Package is of course in repositories
  4. 'stringr' is of course a package
  5. My R is not out of date, I recently upgrated it to 3.2.0 version
  6. 'stringr' is not an archive package
  7. This did not give positive result:

    install.packages("stringr", type = "source")
    Installing package into ‘C:/Users/kozlovpy/Documents/R/win-library/3.2’
    (as ‘lib’ is unspecified)
    also installing the dependency ‘stringi’

    пробую URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/src/contrib/stringi_0.5-5.tar.gz'
    Content type 'application/octet-stream' length 3639183 bytes (3.5 MB)
    downloaded 3.5 MB

    пробую URL 'https://mran.revolutionanalytics.com/snapshot/2015-08-27/src/contrib/stringr_1.0.0.tar.gz'
    Content type 'application/octet-stream' length 34880 bytes (34 KB)
    downloaded 34 KB

    • installing source package 'stringi' ...
      ** пакет 'stringi' удачно распакован, MD5 sums проверены
      Предупреждение: работающая команда 'sh ./configure.win' имеет статус 127
      ERROR: configuration failed for package 'stringi'
    • removing 'C:/Users/kozlovpy/Documents/R/win-library/3.2/stringi'
      ERROR: dependency 'stringi' is not available for package 'stringr'
    • removing 'C:/Users/kozlovpy/Documents/R/win-library/3.2/stringr'

    Скачанные исходники пакетов находятся в
    ‘C:\Users\kozlovpy\AppData\Local\Temp\RtmpgnfwL4\downloaded_packages’
    Предупреждения:
    1: работающая команда '"C:/PROGRA~1/RRO/R-32~1.2/bin/x64/R"
    CMD INSTALL -l "C:\Users\kozlovpy\Documents\R\win-library\3.2"
    C:\Users\kozlovpy\AppData\Local\Temp\RtmpgnfwL4/downloaded_packages/stringi_0.5-5.tar.gz' имеет статус 1
    2: В install.packages("stringr", type = "source") :
    установка пакета ‘stringi’ имеет ненулевой статус выхода
    3: работающая команда '"C:/PROGRA~1/RRO/R-32~1.2/bin/x64/R"
    CMD INSTALL -l "C:\Users\kozlovpy\Documents\R\win-library\3.2"
    C:\Users\kozlovpy\AppData\Local\Temp\RtmpgnfwL4/downloaded_pac
    kages/stringr_1.0.0.tar.gz' имеет статус 1
    4: В install.packages("stringr", type = "source") :
    установка пакета ‘stringr’ имеет ненулевой статус выхода

  8. Github packages shows the next:

    install_github("hadley/stringr")
    Downloading github repo hadley/stringr@master
    Ошибка в loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    there is no package called ‘stringi’
    install_github("Rexamine/stringi")
    Downloading github repo Rexamine/stringi@master
    Ошибка в loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    there is no package called ‘stringi’

  9. options(install.packages.check.source = "no") didn't help too

  10. Trying to enter different repos - no hopes.

Any guesses what am I doing wrong?

Barbabas answered 10/12, 2015 at 12:18 Comment(0)
K
16

Sir, I tried this:

install.packages("stringi", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
install.packages("stringr", dependencies=TRUE, INSTALL_opts = c('--no-lock'))

and it worked for me, give it a try!

Kwang answered 14/6, 2016 at 12:17 Comment(2)
Does not work for me, same error installation of package ‘stringi’ had non-zero exit statusTews
altabq, if you press in rstudio "no download compilled version" should workSnooker
T
1

u/Joyvalley's answer to a similar question worked. Just run R as superuser and install stringi then:

sudo -i R
Tews answered 3/12, 2017 at 16:25 Comment(0)
G
1

In my case only combining of two options worked:

running as admin and then:

install.packages("stringi", dependencies=TRUE, INSTALL_opts = c('--no-lock'))

Gaelic answered 17/10, 2018 at 8:56 Comment(0)
N
0

Installing the newest version of Rtools worked for me.

https://cran.r-project.org/bin/windows/Rtools/

Noonan answered 18/6, 2018 at 21:50 Comment(0)
I
0

These error are quite annoying. I able to fix by installing stringi and stringr using conda. conda install -c r r-stringi and conda install -c r r-stringr hope this will help.

Incomputable answered 1/4, 2021 at 7:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.