Cassandra Powershell问题

use*_*760 7 windows powershell cassandra

我正试图在我的Windows笔记本电脑上启动Cassandra,我看到以下错误:

WARNING! Powershell script execution unavailable
Please use 'powershell Set-ExecutionPolicy Unrestricted'
   on this user-account to run cassandra with fully featured
   functionality on this platform.
Starting with legacy startup options
Starting Cassandra Server
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Run Code Online (Sandbox Code Playgroud)

所以我打开Powershell尝试将ExecutionPolicy设置为Unrestricted,我得到以下内容:

来自powershell的错误

所以我按照错误中描述的注册表项进行操作,似乎密钥已经正确设置.我只是缺少一些明显的东西吗?以前版本的Cassandra在我的机器上完美运行,但自从我更新以来,这给了我各种各样的问题.

Sem*_*ker 6

您必须允许在 Windows 7 上执行 PowerShell 脚本。PowerShell 的默认执行策略称为受限。在此模式下,PowerShell 仅作为交互式 shell 运行。

PowerShell 上打开C:\Windows\system32目录,然后运行命令

Set-ExecutionPolicy 不受限制

此外,如果您忘记将执行策略设置回受限模式,则会带来严重的安全风险。

所以,在同一目录中不要忘记运行

Set-ExecutionPolicy 受限

有关详细信息,请单击此处


小智 -2

您是否偶然运行 64 位 powershell.exe,但 Cassandra 尝试使用 32 位 powershell.exe,或者反之亦然?

“C:\ Windows \ System32 \ WindowsPowerShell \ v1.0 \ powershell.exe”

“C:\ Windows \ SysWOW64 \ WindowsPowerShell \ v1.0 \ powershell.exe”