1

When I try to run this command

sudo apt-get install nodejs-legacy

it gives it as

Reading package lists... Done Building dependency tree Reading state information... Done Package nodejs-legacy is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: nodejs:i386 nodejs

How to get a workaround from this? I can't find a proper fix anywhere.

1 Answer 1

6

The nodejs-legacy package simply installs a symbolic link so that it can be executed using the node command.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs nodejs-legacy
2
  • Hello it works but while installing it shows this on running second commandsudo apt-get install -y nodejs nodejs-legacy Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'nodejs' instead of 'nodejs-legacy' The following NEW packages will be installed: nodejs 0 upgraded, 1 newly installed, 0 to remove and 1107 not upgraded. Need to get 13.5 MB of archives. After this operation, 64.0 MB of additional disk space will be used. Like I need legacy one not nodejs
    – Humble
    Commented Sep 24, 2018 at 17:27
  • Literally all the nodejs-legacy package does is create a symbolic link so that the command node runs the command nodejs - if you're trying to install an older version of nodejs the "legacy" package doesn't do this. Commented Sep 24, 2018 at 17:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .