Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

r

stringr

stringi

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?

like image 837
Pavel Kozlov Avatar asked Dec 10 '15 12:12

Pavel Kozlov


People also ask

What does a non zero exit status mean?

A non-zero exit status indicates failure. This seemingly counter-intuitive scheme is used so there is one well-defined way to indicate success and a variety of ways to indicate various failure modes. When a command terminates on a fatal signal whose number is N , Bash uses the value 128+ N as the exit status.

What is Stringr package?

The stringr package provide a cohesive set of functions designed to make working with strings as easy as possible. If you're not familiar with strings, the best place to start is the chapter on strings in R for Data Science.


1 Answers

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!

like image 51
Fábio Avatar answered Sep 20 '22 06:09

Fábio