Mac下安装sbt
为了可以用Eclipse编译基于Scala的Spark Project,需要安装sbt
环境:OS X Yosemite 10.10.3
1.安装Xcode
因为要在终端用macports安装sbt,而Xcode是macports安装的前提,所以要先去APPstore下载Xcode,并安装其command line developer tools。
安装比较简单,详见:https://guide.macports.org/#installing
2.安装macports
去官网下载其安装包并安装,和安装QQ一样简单
详见:https://guide.macports.org/#installing
3.安装sbt
在终端下输入一下命令:
port install sbt
看到类似以下信息就算安装完了:
...这里省略很多log...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/apply-macro/0.13.7/jars/apply-macro.jar ...
[SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.7!apply-macro.jar (9005ms)
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
51 artifacts copied, 0 already retrieved (15709kB/378ms)
Getting Scala 2.10.4 (for sbt)...
downloading https://repo1.maven.org/maven2/org/scala-lang/jline/2.10.4/jline-2.10.4.jar ...
[SUCCESSFUL ] org.scala-lang#jline;2.10.4!jline.jar (1589ms)
:: retrieving :: org.scala-sbt#boot-scala
confs: [default]
5 artifacts copied, 0 already retrieved (24459kB/195ms)
[info] Set current project to hello (in build file:/Users/apple/Desktop/hello/)
4.跑个hello world
为了验证sbt是不是安装成功,我们跑个hello world试试
$ mkdir hello
$ cd hello
$ echo 'object Hi { def main(args: Array[String]) = println("Hi!") }' > hw.scala
$ sbt
...
> run
[info] Updating {file:/Users/apple/Desktop/hello/}hello...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Compiling 1 Scala source to /Users/apple/Desktop/hello/target/scala-2.10/classes...
[info] Running Hi
Hi!
[success] Total time: 4 s, completed Jul 8, 2015 11:17:46 AM
这是官网的示例,按照他的做并出现相同的结果就对了!
到此,mac下安装sbt就结束了。
Mac下安装sbt的更多相关文章
- Mac 下安装Jenkins
Mac 下安装Jenkins 开始 Jenkins是一个基于Java开发的一种持续集成工具,用于建工持续重复的工作,功能包括: 持续的软件版本发布/测试项目 监控外部调用执行的工作. 近期打算搭建自动 ...
- MAC下安装与配置MySQL
MAC下安装与配置MySQL MAC下安装与配置MySQL 一 下载MySQL 访问MySQL的官网http://www.mysql.com/downloads/ 然后在页面中会看到“MySQL ...
- Mac下安装UPnP Inspector
由于工作中需要用到UPnP Inspector这个工具,而这个工具在windows下安装非常简单,在Mac下安装却很麻烦,在此记录安装流程. 这个工具依赖于两个其他的库:Coherence(一个DLN ...
- Mac下安装Wireshark,双击闪退
Mac OS X上使用Wireshark抓包(http://blog.csdn.net/phunxm/article/details/38590561) Mac下安装Wireshark /Appli ...
- Mac下安装zshell
Mac 下安装zshell 什么是shell 大多数命令行用户接触最多的是Bash,因为Bash是各个版本操作系统(Linux&Mac)的默认shell. 查看当前使用的shell $ ech ...
- 【高可用HA】Apache (1) —— Mac下安装Apache Httpd到自定义路径(非/etc/apache2)
Mac下安装Apache Httpd httpd版本: httpd-2.4.17 参考来源: Tomcat Clustering - A Step By Step Guide Apache HTTP ...
- 《OD大数据实战》mac下安装nginx+php
一.mac安装nginx + php + php-fpm 或apache + php 1. Mac 下 Nginx.MySQL.PHP-FPM 的安装配置 2. Mac下安装LNMP(Nginx+P ...
- Mac下安装HBase及详解
Mac下安装HBase及详解 1. 千篇一律的HBase简介 HBase是Hadoop的数据库, 而Hive数据库的管理工具, HBase具有分布式, 可扩展及面向列存储的特点(基于谷歌BigTabl ...
- 在mac下安装jdk1.7(转)
转自:http://vela.diandian.com/post/2012-01-06/15379924 最近呢,想玩玩jdk1.7,不过mac平台下的jvm一直都是Apple自己改的,所有有些麻烦. ...
随机推荐
- java C# objective-c AES对称加解密
/** * AES加解密 */ public class AESHelper { final static String AES_KEY = "43hr8fhu34b58123"; ...
- [转]OData and Authentication – Part 6 – Custom Basic Authentication
本文转自:https://blogs.msdn.microsoft.com/astoriateam/2010/07/21/odata-and-authentication-part-6-custom- ...
- SQL Server 获取(本周、本月、本旬、本季、本年)的某一天
/*------------------------------本周----------------------------------------*/ --本周第一天 ),getdate()) -- ...
- c#配置文件app.config 与 Settings.settings
本篇博客将介绍C#中Settings的使用.参考:https://docs.microsoft.com/zh-cn/visualstudio/ide/managing-application-sett ...
- C# 配置文件操作类
注意添加引用:System.Configuration: using System; using System.Collections.Generic; using System.Text; usin ...
- 第8天:javascriptDOM小 案例、onmouseover 、onmouseout
案例 为元素注册点击事件,弹出对话框 <input type="button" id="btn" value="开发分离"> & ...
- Groovy中each、find跳出循环
在groovy中使用break跳出each或者find的循环会会报错,为什么呢?groovy中each.find方法是一个闭包操作,要想跳出循环要使用 return true,但有几个问题有待研究: ...
- HDFS学习
HDFS体系结构 HDFS采用了主从(Master/Slave)结构模型,一个HDFS集群包括一个名称节点(NameNode)和若干个数据节点(DataNode)(如图所示).名称节点作为中心服务器, ...
- 线程协作--wait,notify:经典消费者生产者
JDK 中关于wait,notify这两个方法的介绍: 1.wait:线程进入阻塞. synchronized (obj) { while (<condition does not hold&g ...
- C++11:实用特性
今天逛cplusplus.com发现C++还真多了不少方便使用的特性,先了解些最常用的 初始化列表 vector<,,,}); vector<pair<int, int> &g ...