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

NodeJS Still Not Working on Debian #8

Open
rtruxal opened this issue Jun 26, 2018 · 1 comment
Open

NodeJS Still Not Working on Debian #8

rtruxal opened this issue Jun 26, 2018 · 1 comment

Comments

@rtruxal
Copy link

rtruxal commented Jun 26, 2018

This is my 3rd time having serious issues with installing

  • nodejs
  • npm
  • nodejs-legacy
    on on a fresh Debian box. This brings me to a question that I'll explain more below.

My Question:

Is nodejs-legacy absolutely necessary to install jupyterhub?

Potential fixes:

Unlike on Debian 8 ("jessie,") installing nodejs & nodejs-legacy on Debian 9 actually works out of the box. However, things get tricky when you try to install npm with apt-get. The internet says you can either:

  1. compile everything from source (not fun)
  2. use nvm (Node Version Manager, which doesn't pass the apt: name={{item}} state=present check.)
  3. add the Node LTS PPA & corresponding gpg key, then install with apt. (looks like the best option)

Number 3 seems like the best shot:

Upgrading to Debian 9 ("stretch") with backports, & adding the current Node LTS PPA has gotten me the farthest, but this route is still giving me trouble with nodejs-legacy. Mind you, I haven't even run the playbook yet, I'm trying to figure out what tasks to add.

Here's the shell code to install the PPA for the most current Node LTS Repo:

~$ curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -

npm has now become installible with apt! However nodejs-legacy is now throwing the ol' "you have held broken packages" error.

So with that, here's my question again:

Is nodejs-legacy absolutely necessary to install jupyterhub with this playbook?

@rtruxal
Copy link
Author

rtruxal commented Jun 26, 2018

nodejs-legacy is not a necessary dep for Debian.

From [CTTE #614907] Resolution of node/nodejs conflict:

The nodejs source package shall also provide a nodejs-legacy binary
package at Priority: extra that contains /usr/bin/node as a symlink to
/usr/bin/nodejs. No package in the archive may depend on or recommend
the nodejs-legacy package, which is provided solely for upstream
compatibility.

nodejs-legacy just makes a symlink. That's it.

To fix it I have:

  • added the node PPA & install nodejs & npm via apt.
  • Commented out the - nodejs-legacy line inside ansible-jupyterhub/vars/main.yml
  • Run ~$ ln -s /usr/bin/nodejs /usr/bin/node on the jupyterhub host.

I may be able to make a pull-req if I have time, but if anyone can beat me to it, this^ is the procedure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant