Amazon Linux AMI Beta-node.js未使用 opensll 加密支持进行编译

Amazon Linux AMI Beta-node.js未使用 opensll 加密支持进行编译

我已经安装了 nodejs、npm 和运行聊天应用程序所需的模块。运行时,我收到这些错误。我该怎么办?

[ec2-user@ip-10-170-91-52 ~]$ cd chat
[ec2-user@ip-10-170-91-52 chat]$ node server.js

node.js:181
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: node.js not compiled with openssl crypto support.
    at tls.js:45:9
    at NativeModule.compile (node.js:430:5)
    at node.js:398:18
    at https.js:22:11
    at NativeModule.compile (node.js:430:5)
    at Function.require (node.js:398:18)
    at Function._load (module.js:285:25)
    at require (module.js:364:19)
    at Object.<anonymous> (/usr/local/lib/node/.npm/connect/1.4.0/package/lib/https.js:14:13)
    at Module._compile (module.js:420:26)
[ec2-user@ip-10-170-91-52 chat]$ ^C
[ec2-user@ip-10-170-91-52 chat]$

答案1

安装 OpenSSL:
sudo yum install openssl openssl-devel

相关内容