自学内容网 自学内容网

ubuntu安装nvm简易版

  1. Open a terminal and run the following command to install the required packages:
sudo apt-get update
sudo apt-get install build-essential libssl-dev
  1. Then, run the following command to download and install nvm:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.1/install.sh | bash

This will download the nvm installation script and run it.

  1. Once the installation is complete, you’ll need to add the following line to your shell configuration file (e.g. ~/.bashrc or ~/.zshrc) to enable nvm:
source ~/.nvm/nvm.sh
  1. Reload your shell configuration file by running:
source ~/.bashrc

(or source ~/.zshrc if you’re using zsh)

  1. Verify that nvm is installed by running:
nvm --version

This should display the version of nvm that you just installed.

That’s it! You should now be able to use nvm to manage multiple versions of Node.js on your Ubuntu system.

Note: If you’re using a newer version of Ubuntu, you may need to use the curl command with the -s flag to suppress the progress meter, like this:

curl -s -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.1/install.sh | bash

原文地址:https://blog.csdn.net/CherishTaoTao/article/details/142485935

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!