猫不被识别为内部或外部命令

23

我正在学习有关Google应用引擎上的大查询,并希望尝试此库,它还要求我了解将服务帐户凭据转换为其他格式。我已尝试使用命令

# Convert the key from pkcs12 to pkcs1 (PEM).
$ cat /path/to/xxxx-privatekey.p12 | openssl pkcs12 -nodes -nocerts -passin pass:notasecret | openssl rsa > /path/to/secret.pem

但我在命令行上得到了

'cat' is not recognized as an internal or external command,
operable program or batch file.

我该如何解决这个问题?


5
“cat” 是一个UNIX命令,在Windows系统上不可用。“openssl”也无法作为命令使用。 - Martijn Pieters
1
顺便说一下,这与Python无关。 - Martijn Pieters
11
在Windows命令提示符中,可以用"type"代替"cat",但这仍不能完全解决你的问题。正如@MartijnPieters指出的那样,除非你安装了openssl,否则这个命令是无法运行的。 - Ryan Bemrose
1
我没有Windows环境来为您测试,但是在谷歌搜索“将pkcs12密钥转换为pkcs1 windows”时会有几个结果可供选择,包括一个Powershell选项 - Martijn Pieters
1
安装Cygwin会很有帮助。Cygwin将一些Unix命令和工具添加到Windows环境中。 - kkhipis
显示剩余6条评论
2个回答

35

使用Windows PowerShell。从Windows 7开始,它已经与Windows一起提供。


1
PowerShell为我解决了这个问题。谢谢。 - Ish
PowerShell自Windows Vista开始就已经包含了,而不是Windows 7。 - phuclv

0

使用“Windows PowerShell”命令来代替“cat”命令,它会起作用。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接