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

Unable to install Nodejs #616

Closed
Vm900 opened this issue Mar 9, 2018 · 6 comments
Closed

Unable to install Nodejs #616

Vm900 opened this issue Mar 9, 2018 · 6 comments

Comments

@Vm900
Copy link

Vm900 commented Mar 9, 2018

Hi
Been trying to install nodejs for days without any success.
I keep getting the following error messages:
dpkg: error processing archive /data/data/com.termux/files/usr/var/cache/apt/archives/nodejs_8.10.0_arm.deb(--unpack): corrupted filesystem tarfile -corrupted package archive
dpkg-deb (subprocess): decompressing archive member: Izma write error: Broken pipe
dpkg-deb: error: subprocess returned error exit status 2
Errors were encountered while processing:
/data/data/com.termux/files/usr/var/cache/apt/archives/nodejs_8.10.0_arm.deb
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1)
----------------- ----__x_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Please Help
Thanks

@ghost
Copy link

ghost commented May 26, 2018

Did you try install via Termux repo or official tarball? If official install, too does not work, NVM may work still.. Try installation via NVM.

@ghost
Copy link

ghost commented Jun 10, 2018

@Vm900 Does pkg install nodejs work? It installs version 8.11.2 (the latest LTS version).

@goodevilgenius
Copy link

goodevilgenius commented Jun 13, 2018

I tried nvm, and it doesn't work on Termux because nvm doesn't work if PREFIX is set. It shows an error saying it doesn't work if PREFIX is set.

I tried to get around it by doing the following:

PREFIX= nvm use --delete-prefix stable

This let it use the proper version, and npm and npx both worked, but node failed. I suspect node and npm have some conflict with the PREFIX and the way nvm sets it.

There's more info at nvm-sh/nvm#1645 (comment)

But, I am able to use the version from the regular repos. Just pkg install nodejs, and it works fine. Unfortunately, it's only 9.11.1, instead of the most recent version.

@ljharb
Copy link

ljharb commented Jun 13, 2018

Specifically, npm itself uses $PREFIX - so the collision means that Termux chould maybe alternatively support $TERMUX_PREFIX, and then Termux users could use either one, but node/npm users could use the termux-specific one?

@ghost
Copy link

ghost commented Jun 14, 2018 via email

@Vm900
Copy link
Author

Vm900 commented Jun 14, 2018

@goodevilgenius Yep it works but it installs an earlier version not the latest

@Vm900 Vm900 closed this as completed Jun 14, 2018
@ghost ghost locked and limited conversation to collaborators Oct 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants