我尝试安装sbt和scala符合Unix的文档Setup sbt:
~/bin
#!/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
- 工作正常(它显示信息消息)。