npm install openssl在Windows 10上失败 [英] npm install openssl failed on windows 10

查看:539
本文介绍了npm install openssl在Windows 10上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Win10的Node.js命令窗口中运行以下命令.失败了任何人都有如何解决的想法?我正在运行Node.js v7.3.0

I am running the following command in Node.js command window in Win10. It failed. anyone has ideas how to fix it? I am running Node.js v7.3.0

C:\Users\haozhang>npm install openssl
C:\Users\haozhang
`-- openssl@1.1.0
  +-- mout@0.11.1
  `-- nyks@2.31.3
    +-- async@2.1.5
    | `-- lodash@4.17.4
    `-- mout@1.0.0

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\haozhang\package.json'
npm WARN haozhang No description
npm WARN haozhang No repository field.
npm WARN haozhang No README data
npm WARN haozhang No license field.

C:\Users\haozhang>openssl
'openssl' is not recognized as an internal or external command,
operable program or batch file.

推荐答案

如Royi Mindel所述,npm openssl软件包只是对openssl二进制文件的包装,而不是实际的openssl.您需要按照以下步骤在Windows 10计算机上安装openssl:

As mentionned by Royi Mindel the npm openssl package is just a wrapper around the openssl binaries and not the actual openssl. You need to install openssl on your Windows 10 machine as follows:

  1. https://code.google.com/下载二进制文件存档/p/openssl-for-windows/下载
  2. 解压缩为C:\OpenSSL-Win32\(或您想给它的任何名称).
  3. 添加值为c:\OpenSSL-Win32\openssl.cnf的系统环境变量OPENSSL_CONF(指向您提取二进制文件的配置文件)
  4. C:\OpenSSL-Win32\bin添加到您的Path环境变量中
  5. 打开cmd或PowerShell,然后键入openssl version.它应该可以正常工作,并且您应该会看到已安装的版本
  1. Download the binaries from https://code.google.com/archive/p/openssl-for-windows/downloads
  2. Extract to C:\OpenSSL-Win32\ (or whatever name you want to give it).
  3. Add the system environment variable OPENSSL_CONF with value c:\OpenSSL-Win32\openssl.cnf (points to the config file where you extrated the binaries)
  4. Add C:\OpenSSL-Win32\bin to your Path environment variable
  5. Open a cmd or PowerShell and type openssl version. It should work and you should see the version installed

信息摘自: https://www.tbs- certificate.co.uk/FAQ/zh-CN/openssl-windows.html

这篇关于npm install openssl在Windows 10上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆