0

I was working on my xaringan slides and everything was working perfectly. Out of nowhere, the slides, and all r markdown documents, stopped knitting. When I try to knit, I get the following error

Rendering R Markdown documents requires an updated version of the stringi package.

I download the package, but it still doesn't work. I updated R, uninstalled and re-installed R Studio, and it still not working.

I get the following message when I install stringi:

Package 'stringi' successfully installed. Warning message: In utils::install.packages("stringi", repos = "https://cran.rstudio.com/") : installation of package ‘stringi’ had non-zero exit status

I tried the following remedies with no luck

install.packages("rmarkdown", repos = "https://packagemanager.rstudio.com/all/latest")

install.packages("xfun", type = "source")

Here's my R version

R.version

platform       x86_64-apple-darwin17.0     
arch           x86_64                      
os             darwin17.0                  
system         x86_64, darwin17.0          
status                                     
major          4                           
minor          2.1                         
year           2022                        
month          06                          
day            23                          
svn rev        82513                       
language       R                           
version.string R version 4.2.1 (2022-06-23)
nickname       Funny-Looking Kid  

Here's my session info:

sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.4

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
 [1] compiler_4.2.1  fastmap_1.1.0   cli_3.3.0      
 [4] htmltools_0.5.2 tools_4.2.1     rstudioapi_0.13
 [7] yaml_2.3.5      rmarkdown_2.14  knitr_1.39     
[10] pagedown_0.18   xfun_0.31       digest_0.6.29  
[13] rlang_1.0.3     evaluate_0.15  
  • 1
    What do you see if you run `library(stringi)`? – MrFlick Jul 11 '22 at 14:16
  • Maybe there are dependencies of stringi package. Try to upload all packages. And when installing stringi be sure that there is no other instance of R is running on your computer. If this fails go to your code and remove the slide with stringi code and check again. All in all I am quite sure that this is a environment problem. Until I grasped this with my brain 2 years went by. In short If you work with Rmarkdown you must load each library each dataframe over Rmarkdown, because each time R markdown starts everything that was in the memory before is lost, so you have to "load" it again! – TarJae Jul 11 '22 at 14:25
  • @MrFlick when I run library(stringi) I get an error that the package doesn't exist even after I install it. – Hussain Hadah Jul 11 '22 at 16:28
  • I don't understand how you can get the message "Package 'stringi' successfully installed" but then get an error saying the package is not installed when you run `library(stringi)`. I would have expected a different error. What is the exact text of that error message. Are you sure it's not saying that a different package doesn't exist? – MrFlick Jul 11 '22 at 16:57
  • Potentially could the `stringi` package have been installed in the library of a different version of R than what RMarkdown is using? – Jon Spring Jul 11 '22 at 18:24
  • might be worth uninstalling and reinstalling R and RStudio in order to troubleshoot no corrupt files – Daniel_j_iii Jul 12 '22 at 02:57
  • I was able to avoid this issue by installing `stringi` package without its dependencies. – Hussain Hadah Jul 12 '22 at 13:49

0 Answers0