【发布时间】:2022-01-06 21:28:02
【问题描述】:
我在 Windows 10 上通过 Powershell 安装了 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
我该如何解决这个错误?
【问题讨论】:
-
按照错误消息中的说明运行
Import-Module ClojureTools- 然后您应该会收到更具体的错误消息。 -
我知道您询问过 Powershell,但如果您可以在 WSL 或 WSL2 下安装和运行 clojure,您可能会遇到更少的问题。
-
我确实运行了
Import-Module ClojureTools,但出现以下错误:Import-Module : File C:\Program Files\WindowsPowerShell\Modules\ClojureTools\ClojureTools.psm1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1 + Import-Module ClojureTools + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : SecurityError: (:) [Import-Module], PSSecurityException
标签: powershell clojure