windows “openssl”未被识别为内部或外部命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20838516/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
'openssl' is not recognized as internal or external command
提问by osimer pothe
I am trying to execute the following command in command prompt .
我正在尝试在命令提示符中执行以下命令。
keytool -exportcert -alias androiddebugkey -keystore "<path-to-users-directory>\.android\debug.keystore" | openssl sha1 -binary | openssl base64
But the command prompt windows reports:
但是命令提示符窗口报告:
'openssl' is not recognized as internal or external command.
What ca I do to execute this command in command prompt window?
我该怎么做才能在命令提示符窗口中执行此命令?
回答by steveayre
The error you saw means there's no such program in your %PATH%
(external command) and it's also not a built-in shell command (internal command).
您看到的错误意味着您的%PATH%
(外部命令)中没有这样的程序,而且它也不是内置的 shell 命令(内部命令)。
Install OpenSSL on your machine. You will also need to check that its installed location is in your %PATH%
. By default it probably won't be. As an example, suppose OpenSSL is installed at c:\OpenSSL-Win32
. The openssl
binary is probably located at c:\OpenSSL-Win32\bin\openssl.exe
. So you path needs to include c:\OpenSSL-Win32\bin
.
在您的机器上安装 OpenSSL。您还需要检查其安装位置是否在您的%PATH%
. 默认情况下它可能不会。例如,假设 OpenSSL 安装在c:\OpenSSL-Win32
. 该openssl
二进制可能是位于c:\OpenSSL-Win32\bin\openssl.exe
。所以你的路径需要包含c:\OpenSSL-Win32\bin
.
Sometimes OpenSSL cannot find its configuration file on Windows. For that, see OpenSSL and error in reading openssl.conf file.
有时 OpenSSL 在 Windows 上找不到其配置文件。为此,请参阅OpenSSL 和读取 openssl.conf 文件时出错。
Another option is to use the full path in the command:
另一种选择是在命令中使用完整路径:
keytool -exportcert -alias androiddebugkey -keystore "<path-to-users-directory>\.android\debug.keystore" | ^
c:\OpenSSL-Win32\bin\openssl.exe sha1 -binary | c:\OpenSSL-Win32\bin\openssl.exe base64
However, this still suffers the OpenSSL configuration file problem detailed at OpenSSL and error in reading openssl.conf file.
但是,这仍然会遇到 OpenSSL 中详述的 OpenSSL 配置文件问题以及读取 openssl.conf 文件时出错。
回答by osimer pothe
install openssl for windows from the following link .
从以下链接为 windows 安装 openssl。
https://code.google.com/p/openssl-for-windows/downloads/detail?name=openssl-0.9.8k_WIN32.zip
https://code.google.com/p/openssl-for-windows/downloads/detail?name=openssl-0.9.8k_WIN32.zip
回答by Ahmed Mihoub
回答by Elias
- Go to: https://code.google.com/archive/p/openssl-for-windows/downloads
- Extract file
- open bin/openssl.exe
- 转到:https: //code.google.com/archive/p/openssl-for-windows/downloads
- 提取文件
- 打开 bin/openssl.exe
回答by KCShelby
Install openssl on your Windows machine.
在您的 Windows 机器上安装 openssl。