官網下載包解壓之後進入目錄:
在bin 目錄運行:
sbt -version
如果沒有配置源之類的話,就卡住了,這時無非是在哪個conf文件裏面設置一些參數,找了一下位置就在上圖紅色箭頭所指的
sbtconfig.txt 文件:
-Dsbt.repository.config=~/software/sbt/conf/repo.properties
可以自己加一行本地配置文件的位置,然後去創建這個文件
vim conf/repo.properties
[repositories]
local
aliyun: http://maven.aliyun.com/nexus/content/groups/public/
typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sonatype-oss-releases
maven-central
sonatype-oss-snapshots
設置好之後再次運行 sbt -version
就會去下載一些依賴啥的
當你的sbt能顯示版本說明就能運行了: