0

I get the following error when trying to install stringi:

trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.4.5.tar.gz'
Content type 'application/x-gzip' length 7284255 bytes (6.9 MB)
==================================================
downloaded 6.9 MB

* installing *source* package ‘stringi’ ...
** package ‘stringi’ successfully unpacked and MD5 sums checked
** using staged installation
checking for R_HOME... /Users/USER/Anaconda3/anaconda3/lib/R
checking for R... /Users/USER/Anaconda3/anaconda3/lib/R/bin/R
checking for endianness... little
checking for R >= 3.1.0 for C++11 use... yes
checking for R < 3.4.0 for CXX1X flag use... no
checking for cat... /bin/cat
checking for local ICUDT_DIR... icu61/data
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/private/var/folders/fy/d14lc6rd5nq827m06zkkb1_h0000gn/T/RtmpWRiuI3/R.INSTALL116de6e601bb4/stringi':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘stringi’
* removing ‘/Users/USER/Anaconda3/anaconda3/lib/R/library/stringi’
* restoring previous ‘/Users/USER/Anaconda3/anaconda3/lib/R/library/stringi’
Warning in install.packages :
  installation of package ‘stringi’ had non-zero exit status

I have seen that this has been an issue in the past, eg. here where there is a clash with Makevars, but I don't have Makevars installed so that cannot be it. (I tried to install the package as a binary but got: "package ‘stringi’ is available as a source package but not as a binary").

Thanks!

Edit: I changed the title to install from update. The package was somehow removed and now I can't install it, or run rmarkdown...

  • Are you using clang8 from here https://cran.r-project.org/bin/macosx/tools/ ? is there a reason to install source packages rather than binary, as is the default for CRAN installations? Ah, I see you're using anaconda; shouldn't you be following anaconda installation instructions rather than using `install.packages()`? – Martin Morgan Jan 13 '20 at 19:56
  • Thanks for your reply Morgan! Updating the package from Rstudio gives the same error message. I have tried to install it with conda install stringi but it does (of course) not work since it is already installed. I want to update stringi because I think/hope it causes problems with kableExtra (kableExtra doesn’t produce the desired html output when using rmarkdown - the table is unformatted in html page (but formatted in viewer). – klarinosaurus Jan 13 '20 at 21:18
  • RStudio uses `install.packages()` 'under the hood' so it is not surprising that it fails. I guess you mean conda has installed a different version of stringi than the one you want. Have you tried to ask for help on https://docs.conda.io/en/latest/help-support.html ? – Martin Morgan Jan 13 '20 at 21:56
  • @MartinMorgan I don't understand what you mean. I can upgrade other packages that way (from RStudio). – klarinosaurus Jan 14 '20 at 05:25
  • Probably the other packages you updated don't have to compile code. Even if they do, they might use the compiler differently from how stringi needs to use the compiler. I'm not an conda user so can't provide details, but that is likely the problem. The instructions in this comment https://github.com/conda/conda/issues/4355#issuecomment-353314027 might be relevant – Martin Morgan Jan 14 '20 at 07:20
  • The instructions in the comment didn't help I'm afraid. I get the same uninformative error message: "configure: error: C compiler cannot create executables". :( – klarinosaurus Jan 14 '20 at 18:56

0 Answers0