Unable to load packages: cannot open shared object file

This issue that I described in the title occurs when I try to load any library. This issue recently started happening after updating a couple of my machines running Manjaro.

> library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/chance/R/x86_64-pc-linux-gnu-library/3.6/stringi/libs/stringi.so':
  libicui18n.so.64: cannot open shared object file: No such file or directory

This occurs when I try to load any package, not just Tidyverse. Occurs in RStudio and when running R from the terminal. Because it happened on Manjaro on multiple machines after the same major update, this may be a better question on their forms, but this issue only seems to be affecting R for me.

If anyone could clue me in as to what information I may be able to provide to receive better help, please let me know and I'll provide that info.

R version 3.6.1
RStudio version 1.2.5033

Thanks in advance for any insight you may have!

1 Like

The key part of the error message is

libicui18n.so.64: cannot open shared object file: No such file or directory

I've seen a thread in Arch reporting that re-installing stringi as root will solve the problem. Open an R console with sudo R and then install.packages("stringi")


Thanks for your reply! Unfortunately, doing so did not resolve the issue. The command seemed to run fine and gave me the typical output from installing a package. After a quick restart, any library() calls from non-root R still fail with the same error. You might be able to see why I am at a loss, then!


Bummer. A little more digging comes up with the stringi help page on installing compiled dependencies. Try digging through that. It may be that using your package manager to install the ICU4C >= 52 library will bring in the missing libicui18n.so.52 file.


I see. Thank you for the extra perspective. I posed the issue to the good folk over on the Manjaro forum and they suggested deleting the stringi folder and running install.package("stringi") again from R, but not as root. That seemed to work.

That forum post is linked here.

Thank you so much for your help, it helped point me in the right direction.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.