Centos7安装NVM

本文档详细介绍了在Centos7系统上安装NVM的过程,包括遇到的安装失败问题,解决方法,如何将NVM加入系统环境,验证安装成功,查看NVM版本列表,安装指定版本的Node.js,以及设置默认Node版本。
摘要由CSDN通过智能技术生成

Centos7安装NVM


安装

[root@localhost ~]# curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12540  100 12540    0     0     98      0  0:02:07  0:02:07 --:--:--  3575
=> Downloading nvm as script to '/root/.nvm'

=> Appending nvm source string to /root/.bashrc
=> Appending bash_completion source string to /root/.bashrc
=> You currently have modules installed globally with `npm`. These will no
=> longer be linked to the active version of Node when you install a new node
=> with `nvm`; and they may (depending on how you construct your `$PATH`)
=> override the binaries of modules installed with `nvm`:

/root/node-v10.13.0-linux-x64/lib
└── nvm@0.0.4
=> If you wish to uninstall them at a later point (or re-install them under your
=> `nvm` Nodes), you can remove them from the system Node as follows:

     $ nvm use system
     $ npm uninstall -g a_module

=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
[root@localhost ~]#

安装失败

  • 更新nss和curl
[root@localhost ~]# sudo yum update nss curl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.bfsu.edu.cn
 * epel: mirrors.bfsu.edu.cn
 * extras: mirrors.bfsu.edu.cn
 * updates: mirrors.bfsu.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package curl.x86_64 0:7.29.0-35.el7.centos will be updated
---> Package curl.x86_64 0:7.29.0-59.el7_9.1 will be an update
--> Processing Dependency: libcurl = 7.29.0-59.el7_9.1 for package: curl-7.29.0-59.el7_9.1.x86_64
---> Package nss.x86_64 0:3.21.0-17.el7 will be updated
--> Processing Dependency: nss = 3.21.0-17.el7 for package: nss-sysinit-3.21.0-17.el7.x86_64
--> Processing Dependency: nss(x86-64) = 3.21.0-17.el7 for package: nss-tools-3.21.0-17.el7.x86_64
---> Package nss.x86_64 0:3.53.1-3.el7_9 will be an update
--> Processing Dependency: nss-util >= 3.53.1-1 for package: nss-3.53.1-3.el7_9.x86_64
--> Processing Dependency: nss-softokn(x86-64) >= 3.53.1-2 for package: nss-3.53.1-3.el7_9.x86_64
--> Processing Dependency: nspr >= 4.25.0 for package: nss-3.53.1-3.el7_9.x86_64
--> Processing Dependency: nss-pem(x86-64) for package: nss-3.53.1-3.el7_9.x86_64
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.39)(64bit) for package: nss-3.53.1-3.el7_9.x86_64
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.38)(64bit) for package: nss-3.53.1-3.el7_9.x86_64
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.31)(64bit) for package: nss-3.53.1-3.el7_9.x86_64
--> Processing Dependency: libnssutil3.so(NSSUTIL_3.24)(64bit) for package: nss-3.53.1-3.el7_9.x86_64
--> Running transaction check
---> Package libcurl.x86_64 0:7.29.0-35.el7.centos will be updated
---> Package libcurl.x86_64 0:7.29.0-59.el7_9.1 will be an update
--> Processing Dependency: libssh2(x86-64) >= 1.8.0 for package: libcurl-7.29.0-59.el7_9.1.x86_64
---> Package nspr.x86_64 0:4.11.0-1.el7_2 will be updated
---> Package nspr.x86_64 0:4.25.0-2.el7_9 will be an update
---> Package nss-pem.x86_64 0:1.0.3-7.el7 will be installed
---> Package nss-softokn.x86_64 0:3.16.2.3-14.4.el7 will be updated
---> Package nss-softokn.x86_64 0:3.53.1-6.el7_9 will be an update
--> Processing Dependency: nss-softokn-freebl(x86-64)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值