How to install a specific version of Node on Ubuntu?

前端 未结 14 665
Happy的楠姐
Happy的楠姐 2020-12-07 12:52

I would like to install NodeJS version 0.8.18 on Ubuntu 12.04. I tried to install the newest version and then reverting to 0.8.18 by using nvm, but when I run m

14条回答
  •  有刺的猬
    2020-12-07 13:44

    Chris Lea has 0.8.23 in his ppa repo.

    This package let you add a repository to apt-get: (You can also do this manually)

    sudo apt-get install software-properties-common
    

    Add Chris Lea's repository:

    sudo apt-add-repository ppa:chris-lea/node.js-legacy
    

    Update apt-get:

    sudo apt-get update
    

    Install Node.js:

    sudo apt-get install nodejs=0.8.23-1chl1~precise1
    

    I think (feel free to edit) the version number is optional if you only add node.js-legacy. If you add both legacy and ppa/chris-lea/node.js you most likely need to add the version.

提交回复
热议问题