0

由于无效参数导致编译失败,我无法执行简单的 Kotlin 脚本。

这是我的 Kotlin 脚本:

#!/usr/bin/env kscript 
println("Helloooo")

然后我编写了非常简单的脚本,添加了可执行权限来执行它: chmod u+x SomeScript.kts

这是错误:

$ ./SomeScript.kts
[kscript] [ERROR] compilation of './SomeScript.kts' failed
error: invalid argument: -d
info: use -help for more information

我该如何解决?

4

1 回答 1

0

你安装了正确的kscript吗?在您的系统操作系统的基础上检查这里https://github.com/holgerbrandl/kscript

于 2020-11-07T18:46:40.427 回答