powershell - Clojure 已安装,但 clj 失败

标签 powershell clojure

我通过 Powershell 在 Windows 10 上安装了 Clojure,安装时没有任何错误。然而,当我输入“clj”时,它给出了以下错误:

clj : The 'clj' command was found in the module 'ClojureTools', but the module could not be loaded. For more
information, run 'Import-Module ClojureTools'.
At line:1 char:1
+ clj
+ ~~~
    + CategoryInfo          : ObjectNotFound: (clj:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

我将其安装到以下位置:C:\Program Files\WindowsPowerShell\Modules

如何解决此错误?

最佳答案

我认为你需要运行:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force

因为您的系统不允许执行下载的脚本。当然,这对您来说有多安全完全取决于您。 我建议您查看我编写的本教程:

https://github.com/littleli/scoop-clojure/wiki/Getting-started

它提供了替代的、更方便的方式来安装 Clojure。此外,它还提供了简单的更新路径,并允许访问越来越多的对您可能有用的实用程序。

最后。如果您可以访问适用于 Linux 的 Windows 子系统 (WSL2),我可能会朝这个方向发展。

关于powershell - Clojure 已安装,但 clj 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70613828/

相关文章:

c++ - g++ 不生成任何文件或提供任何输出

mysql - Powershell管道文件内容到应用程序而不在内存中加载文件

powershell - 如何向 PowerShell PSDrive "function:"上的函数对象添加属性?

clojure - Cascalog deffilterop 与纯 clojure

string - 如何从字符串 Clojure 中删除反斜杠\

.net - PowerShell cmdlet 与 .NET 类

xml - 如何在powershell中获取深度深度xml值

clojure - 如何在 clojure 中定义类型列表?

testing - 如何测试使用 gensyms 的 clojure 宏?

clojure - Clojure 惰性结构与哈希/集合/向量的性能对比?