3

I just updated my ubuntu version recently and i keep getting this error whenever i run any node or npm command. :

node: error while loading shared libraries: libicui18n.so.62: cannot open shared object file: No such file or directory

Any help? this seems to be very recent and Ive spent a lot of time trying to figure this out.

Rohan Gautam
  • 146
  • 1
  • 9
  • Have you tried uninstalling Node and reinstalling it? – T.J. Crowder Mar 11 '19 at 08:19
  • @T.J.Crowder yes, i have. – Rohan Gautam Mar 11 '19 at 08:25
  • 1
    That would be important information to put in the question, along with any other investigation and attempts to fix. – T.J. Crowder Mar 11 '19 at 08:26
  • 1
    A [search](https://duckduckgo.com/?q=node%3A+error+while+loading+shared+libraries%3A+libicui18n.so&ia=web) on the error turns up several pages and [this SO question](https://stackoverflow.com/questions/23173181/libicui18n-so-52-cannot-open-shared-object-file), which looks like it has the answer. It's also important to tell us what research you've done (such as searching on the error message) and why what you found didn't help. – T.J. Crowder Mar 11 '19 at 08:27
  • @T.J.Crowder Thank you for the advice. The answer you linked involved docker which im not working with. I'm also a beginner which is why i don't know how to remove/update `libicui18n.so.62` when any npm/node command is not working(due to the mentioned error). That's why I haven't found anything quite like what iI'm stuck on, or atleast not something i understand. – Rohan Gautam Mar 11 '19 at 09:46

1 Answers1

5

Okay, to anyone who might encounter this.

sudo apt-get purge --auto-remove nodejs

and reinstalling did not work, because I had installed it using linuxbrew. So if you used linuxbrew during the install,

brew uninstall node
brew install node

works. This seems to have been caused due to a recent OS update(ubuntu), and this fixed it for me.

Rohan Gautam
  • 146
  • 1
  • 9
  • Just for reference: [this is the same answer](https://stackoverflow.com/a/73397912/4575793) for Arch/Manjaro/... – Cadoiz Jan 26 '23 at 13:40