Issue resolved by removing ~/.R/Makevars
.
Exact steps taken:
mv ~/.R/Makevars ~/.R/old_Makevars
(note that the file has been renamed rather than deleted in case it may need to be restored)install.packages("stringi")
This question might be useful to discover the contents/purpose of ~/.R/Makevars.