npm: relocation error: npm: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.

npm: relocation error: npm: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.


参考:

1.https://stackoverflow.com/questions/46473376/node-relocation-error-node-symbol-ssl-set-cert-cb-version-libssl-so-10-not-d

2.https://www.cnblogs.com/hsia2017/p/8387604.html


环境:Centos 7
[root@test1280 ~]# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 
[root@test1280 ~]# uname -a
Linux test1280 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@test1280 ~]# npm -v
3.10.10
[root@test1280 ~]# node -v
v6.17.1

重现:npm install -g http-server
[root@test1280 ~]# npm install -g http-server
npm: relocation error: npm: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.so.10 with link time reference

解决:升级openssl库 yum update openssl -y
[root@test1280 ~]# yum update openssl -y
……
[root@test1280 ~]# npm install -g http-server
/usr/bin/http-server -> /usr/lib/node_modules/http-server/bin/http-server
/usr/bin/hs -> /usr/lib/node_modules/http-server/bin/http-server
/usr/lib
└─┬ http-server@0.11.1 
  ├── colors@1.0.3 
  ├── corser@2.0.1 
  ├─┬ ecstatic@3.3.2 
  │ ├── he@1.2.0 
  │ ├── mime@1.6.0 
  │ ├── minimist@1.2.0 
  │ └── url-join@2.0.5 
  ├─┬ http-proxy@1.18.0 
  │ ├── eventemitter3@4.0.0 
  │ ├── follow-redirects@1.9.0 
  │ └── requires-port@1.0.0 
  ├── opener@1.4.3 
  ├─┬ optimist@0.6.1 
  │ ├── minimist@0.0.10 
  │ └── wordwrap@0.0.3 
  ├─┬ portfinder@1.0.25 
  │ ├─┬ async@2.6.3 
  │ │ └── lodash@4.17.15 
  │ ├─┬ debug@3.2.6 
  │ │ └── ms@2.1.2 
  │ └─┬ mkdirp@0.5.1 
  │   └── minimist@0.0.8 
  └─┬ union@0.4.6 
    └── qs@2.3.3 
[root@test1280 ~]# openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值