I'm trying to install node/npm (and ideally I'd like to do it with nvm) on my BananaPi, but when I run nvm install v12.18.4, I get the error:

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

Trying to apt install libatomic didn't find a package.

  • 2
    The package is called libatomic1. Sep 18 '20 at 18:45
  • @NasirRiley, feel free to post an answer so I can upvote/accept.
    – NH.
    Sep 23 '20 at 14:49
  • It's posted now. Sep 23 '20 at 19:46

The package that you need isn't called libatomic, it's called libatomic1. You can install it with:

apt install libatomic1

Very strange, it said it was already the latest version, but my problem is now inexplicably fixed. All I had to do was (as root):

apt install libatomic1   #said it was already latest version
node                     #command not found
nvm install v12.18.4     #already installed, creating alias
node                     #works this time!

Now my node and npm and everything work as expected.

(if someone else wants to post a better explanation, please do and I'll accept your answer)


And for those using RedHat based distros (RHEL/CentOS/Alma/Rocky), it's

[sudo] <yum|dnf> install libatomic

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.