I've been trying to resolve an issue in VS Code, where the R Language Server is unable to load, and produces the following error message:
R Language Server (8931) started
Error: package or namespace load failed for ‘tidyverse’:
.onAttach failed in attachNamespace() for 'tidyverse', details:
call: NULL
error: package or namespace load failed for ‘stringr’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/lib/R/library/stringi/libs/stringi.so':
libicui18n.so.73: cannot open shared object file: No such file or directory
Execution halted
R Language Server (8931) exited with exit code 1
The following answer indicates the issue may lie with the stringi
package. Long story short, I ended up removing the stringi
package, and tried reinstalling it, resulting in a similar error message to the one above:
$> install.packages("stringi")
Error: package or namespace load failed for ‘tidyverse’:
.onAttach failed in attachNamespace() for 'tidyverse', details:
call: NULL
error: package or namespace load failed for ‘stringr’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘stringi’
Execution halted
The downloaded source packages are in
‘/tmp/Rtmpu5V2g7/downloaded_packages’
Warning message:
In install.packages("stringi") :
installation of package ‘stringi’ had non-zero exit status
I coud use some help understanding the error message and how to resolve the issue.
Update:
I tried installing a different package:
install.packages("fortunes")
This returned in a similar error as the one above, stringi
is missing.
I then tried removing tidyverse
and stringr
and then install tidyverse
again, which returned the error message below:
> remove.packages("tidyverse")
> remove.packages("stringr")
> install.packages("tidyverse")
Error in library(tidyverse) : there is no package called ‘tidyverse’
Execution halted
install.packags("fortunes")
say? – Apneafortunes
, but it rendered the same error as above. I then removedtidyverse
andstringr
, and tried reinstallingtidyverse
again. Now I get the error:Error in library(tidyverse) : there is no package called ‘tidyverse’ Execution halted
– Catechu