0

我尝试根据它的文档安装 sbt 和 scala为 Unix安装 sbt :

  • 我建立~/bin
  • 制作包含内容的 sbt 文件:
#!/bin/bash
SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@"
  • 使脚本可执行:

    $ chmod u+x ~/bin/sbt

但是当我跑步时,我收到了下一条消息:

nazar_art@nazar-art-System-Product-Name ~/bin $ sbt
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000088000000, 536870912, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 536870912 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid2832.log

我不知道我是否做错了,因为sbt -h- 工作正常(它显示信息消息)。

  • 如何解决这个麻烦?
4

0 回答 0