Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install of NodeJs failed to install dependency libatomic.so.1 #3614

Closed
larsno opened this issue Jun 19, 2020 · 4 comments
Closed

Install of NodeJs failed to install dependency libatomic.so.1 #3614

larsno opened this issue Jun 19, 2020 · 4 comments
Labels
External bug 🐞 For bugs which are not caused by DietPi. Solution available 🥂 Definite solution has been done
Milestone

Comments

@larsno
Copy link

larsno commented Jun 19, 2020

Creating a bug report/issue

For maintenance I would like to report that the installation of nodejs on dietpi failed to install dependency libatomic.so.1 After manually installing the missing library, node runs.

Required Information

  • DietPi version | v6.30.0
  • Distro version | 10.4
  • Kernel version | Linux DietPi 4.19.72-sunxi #5.97 SMP Fri Sep 13 08:31:42 CEST 2019 armv7l GNU/Linux
  • SBC model | ZeroPi (armv71) by NanoPi
  • Power supply used | 5V 2A from Asus Router
  • SDcard used | SanDisk ultra 32GB

Additional Information (if applicable)

  • Software title | NodeJs
  • Was the software title installed freshly or updated/migrated? Installed from dietpi-software
  • Can this issue be replicated on a fresh installation of DietPi? I don't know
  • Bug report ID | -

Steps to reproduce

  1. Install NodeJs from dietpi-software
  2. When you run "node --version" get error
    node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

Expected behaviour

  • node should respond with the version

Actual behaviour

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

Extra details

  • When I manually installed the library using "sudo apt-get install libatomic1", node then replied correctly with:
    $ node --version
    v14.4.0
@MichaIng MichaIng added Bug 🐞 Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. labels Jun 19, 2020
@Joulinar
Copy link
Collaborator

Joulinar commented Jun 19, 2020

Hi,

I used a fresh clean DietPi on my RPi3B+ and tried to replicate the issue without success. For me Node.js installation was running fine. As well libatomic1 was present on my empty test system right from the beginning.

root@DietPi3:~# dpkg -l libatomic1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name             Version      Architecture Description
+++-================-============-============-=====================================================
ii  libatomic1:armhf 8.3.0-6+rpi1 armhf        support library providing __atomic built-in functions
root@DietPi3:~#
 DietPi-Software
─────────────────────────────────────────────────────
 Mode: Installing Node.js: javascript runtime

[  OK  ] DietPi-Software | Checking URL: https://raw.githubusercontent.com/taaem/nodejs-linux-installer/master/node-install.sh
--2020-06-19 11:19:18--  https://raw.githubusercontent.com/taaem/nodejs-linux-installer/master/node-install.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1943 (1.9K) [text/plain]
Saving to: ‘node-install.sh’

node-install.sh                       100%[=========================================================================>]   1.90K  --.-KB/s    in 0.004s

2020-06-19 11:19:18 (513 KB/s) - ‘node-install.sh’ saved [1943/1943]

Node Linux Installer by www.github.com/taaem
Running as Root User
Get Latest Version Number...
Done
Downloading latest stable Version node-v14.4.0-linux-armv7l.tar.gz...
Done
Installing...
Finished installing!
root@DietPi3:~# node --version
v14.4.0
root@DietPi3:~#

@MichaIng
Copy link
Owner

Many thanks for your report and solution. From Debian package dependencies it looks like libatomic is required since Node 10 already, or it depends on build options...

Would be nice to have a shared lib dependency list for the pre-compiled Linux binaries but there is none: https://github.com/nodejs/help/wiki/Installation#how-to-install-nodejs-via-binary-archive-on-linux

@MichaIng
Copy link
Owner

MichaIng commented Jun 19, 2020

Found the discussion around that, seems that this dependency is not fully intended. Many PRs were opened to remove it but all closed: nodejs/node#29718
Link has been added here: nodejs/node#28231


I was checking on my Ethernet-only webserver system and libatomic1 was only required for MariaDB and Redis, hence we cannot assume that it is available in every case. On my testing/building VMs it is missing as well.

@Joulinar
Out of interest, what would be removed/depends on libatomic1 on your test system? apt purge libatomic1

@MichaIng MichaIng added External bug 🐞 For bugs which are not caused by DietPi. and removed Bug 🐞 labels Jun 19, 2020
@MichaIng MichaIng added this to the v6.31 milestone Jun 19, 2020
MichaIng added a commit that referenced this issue Jun 19, 2020
+ DietPi-Software | Node.js: libatomic1 is required to start Node since last year: #3614
+ DietPi-Software | Node.js: Increase install verbosity and error handling
+ DietPi-Software | Certbot: Minor wording, uninstall enhancement and use follow official notation "Certbot" with lower case "b".
@MichaIng MichaIng added Solution available 🥂 Definite solution has been done and removed Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. labels Jun 19, 2020
MichaIng added a commit that referenced this issue Jun 19, 2020
+ CHANGELOG | Node.js: Resolved an issue where Node failed to start due to missing new libatmoic1 dependency. Many thanks to @larsno for reporting this issue: #3614
@MichaIng
Copy link
Owner

Fixed with: 95b8e7e
Changelog: 3b7712d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External bug 🐞 For bugs which are not caused by DietPi. Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

3 participants