Stringi installation not recognized; consequently ggplot won't install

package-installation

#1

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 'https://cloud.r-project.org/src/contrib/ggplot2_3.0.0.tar.gz'
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/Rcpp.so':
  /home/bensmith/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/libs/Rcpp.so: 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
	‘/tmp/RtmpEStEk4/downloaded_packages’

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.


#2

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.


#3

@benjsmith You first need to install Rcpp package: https://cran.r-project.org/web/packages/Rcpp/index.html. Then try installing ggplot2 package again.


#4

thank you, that worked!


#5

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:


#6

thanks - that's really helpful to know!