linux下安装sbt
介绍 (Introduction)
Hi! I am Sanjula, and in this guide I hope to teach you how to install sbt on Linux.
嗨! 我是Sanjula ,我希望在本指南中教您如何在Linux上安装sbt。
Let’s get started!
让我们开始吧!
什么是sbt? (What is sbt?)
sbt is an open-source, cross-platform build tool for Scala and Java projects.
sbt是一个用于Scala和Java项目的开源,跨平台构建工具。
Some of its main features are:
它的一些主要功能是:
- Support for continuous compilation, testing and deployment. 支持持续的编译,测试和部署。
- Native support for compiling Scala code. 对编译Scala代码的本机支持。
- Dependency management using Ivy. 使用Ivy进行依赖管理。
- Ability to build descriptions written in Scala using a DSL (Domain-Specific Language). 能够使用DSL(领域特定语言)构建用Scala编写的描述。
安装sbt的步骤 (Steps to install sbt)
- First you have to make sure that a JDK is installed. sbt recommends the Oracle JDK 8 or OpenJDK 8. 首先,您必须确保已安装JDK。 sbt建议使用Oracle JDK 8或OpenJDK 8。
- Open up a terminal and type in the following command, which will point to the debian distribution of sbt and add sbt to the sources list. 打开一个终端并输入以下命令,该命令将指向sbt的debian发行版并将sbt添加到源列表中。
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
- Next, enter the command below, which adds the key of scala to the key list used by apt to authenticate packages. 接下来,在下面输入命令,将scala的密钥添加到apt用来验证软件包的密钥列表中。
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
- Now download the package lists from the repositories to ensure that the list of information on the newest version of packages and their dependencies are updated locally.sudo apt-get update 现在从存储库下载软件包列表,以确保有关软件包的最新版本及其依赖项的信息列表已在本地更新。sudo apt-get update
- Finally run the following command to install sbt.sudo apt-get install sbt 最后运行以下命令安装sbt。sudo apt-get install sbt
Congratulations!!! You have now installed the sbt build tool on your Linux PC! Now you can easily work with Scala and Java projects.
恭喜!!! 现在,您已经在Linux PC上安装了sbt build工具! 现在,您可以轻松地处理Scala和Java项目。
In the meantime, you can share this article if you liked it, or contact me for any concerns. Also please checkout my profile at LinkedIn and follow me on Twitter!
同时, 如果您喜欢它,可以分享此文章 ,也可以与我联系,如有任何疑问。 另外,请在 LinkedIn上 查看我的个人资料, 并在 T witter 上关注我 !
翻译自: https://www.freecodecamp.org/news/how-to-install-sbt-on-linux/
linux下安装sbt