Stringi installation not recognized; consequently ggplot won't install



I've tried to had a problem for a while now in which I can't load the stringi package until I install it clean. This seems to work as long as I'm in a single R session. Then, some time later, maybe when I create a new session or probably after a longer delay, I have to install it again.

This all broke this morning for some reason. Now, if I can install it straight away, and load it, but it's not recognized by ggplot2. Specifically when I try to install ggplot2 I get:

> library(stringi)
> install.packages("ggplot2")
Installing package into ‘/home/bensmith/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL ''
Content type 'application/x-gzip' length 2847050 bytes (2.7 MB)
downloaded 2.7 MB

* installing *source* package ‘ggplot2’ ...
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/bensmith/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/libs/':
  /home/bensmith/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/libs/ undefined symbol: R_ContinueUnwind
ERROR: lazy loading failed for package ‘ggplot2’
* removing ‘/home/bensmith/R/x86_64-pc-linux-gnu-library/3.4/ggplot2’
* restoring previous ‘/home/bensmith/R/x86_64-pc-linux-gnu-library/3.4/ggplot2’
Warning in install.packages :
  installation of package ‘ggplot2’ had non-zero exit status

The downloaded source packages are in

As you can see, stringi loads successfully into the environment, but I get this error when installing ggplot2.

Elsewhere this problem has been reported as fixed by installing stringi, but here, that doesn't help. But I suspect something is wrong with the stringi installation because of the previous problems I have had having to continually reinstall it.


I have tried installing stringi and ggplot2 using

install.packages("stringi", type = "source")
install.packages("ggplot2", type = "source")

Once again, stringi installs but ggplot2 does not.


@benjsmith You first need to install Rcpp package: Then try installing ggplot2 package again.


thank you, that worked!


The installation messages can be really confusing to parse through, but usually the answer is in there somewhere. In case it's useful to you sometime in the future, this is the part that told you that the problem piece in this case was Rcpp, not stringi:


thanks - that's really helpful to know!