Install Rebar on MacOSX
rebar is an Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.
Install Rebar3 on MacOSX
rebar is an Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases.
Rebar3 only handles OTP-structured projects, consisting of applications and/or a release. Previous versions of rebar would build any Erlang source files it encountered in subdirectories and not require a project adhere to OTP standards.
Step: Lets clone rebar3
git clone https://github.com/erlang/rebar3.git
That above should fetch the rebar3 from github as below, and create a rebar3 directory.
Cloning into ‘rebar3’… remote: Enumerating objects: 61, done. remote: Counting objects: 100% (61/61), done. remote: Compressing objects: 100% (50/50), done. remote: Total 20071 (delta 23), reused 31 (delta 11), pack-reused 20010 Receiving objects: 100% (20071/20071), 5.93 MiB | 1.57 MiB/s, done. Resolving deltas: 100% (13730/13730), done.
Bootstrap to create rebar3 script which can be used to perform all the tasks of creating the Erlang OTP applications.
cd reabar3
./bootstrap
Lets create a symlink torebar3so that, we can call it from any folder on the filesystem.
ln -s rebar3 /usr/local/bin
To validate the installation, lets run the below.
rebar3
The above command should result stating the usage of Rebar3 as below.
rebar3 Rebar3 is a tool for working with Erlang projects.
Several tasks are available:
Usage: rebar3 [-h] [-v] [<task>]
-h, — help Print this help. -v, — version Show version information. <task> Task to run.
as Higher order provider for running multiple tasks in a sequence as a certain profiles. clean Remove compiled beam files from apps. compile Compile apps .app.src and .erl files. cover Perform coverage analysis. ct Run Common Tests. deps List dependencies dialyzer Run the Dialyzer analyzer on the project. do Higher order provider for running multiple tasks in a sequence. edoc Generate documentation using edoc. escriptize Generate escript archive. eunit Run EUnit Tests. get-deps Fetch dependencies. help Display a list of tasks or help for a given task or subtask. new Create new project from templates. path Print paths to build dirs in current profile. pkgs List information for a package. release Build release of project. relup Create relup of releases. report Provide a crash report to be sent to the rebar3 issues page. shell Run shell with project apps and deps in path. tar Tar archive of release built of project. tree Print dependency tree. unlock Unlock dependencies. update Update package index. upgrade Upgrade dependencies. version Print version for rebar and current Erlang. xref Run cross reference analysis.
local <task>: install Extract libs from rebar3 escript along with a run script. upgrade Download latest rebar3 escript and extract.
plugins <task>: list List local and global plugins for this project upgrade Upgrade plugins
Run ‘rebar3 help <TASK>’ for details.
Now we have setup Rebar3, with which we can start to create Erlang OTP projects.
In my next post, I shall be taking it up.
메타데이터
- post_id
- 4bfee070fc49
- slug
- install-rebar-on-macosx-4bfee070fc49
- url
- https://medium.com/@erlangcafe/install-rebar-on-macosx-4bfee070fc49
- canonical_url
- https://medium.com/@erlangcafe/install-rebar-on-macosx-4bfee070fc49
- author_url
- https://medium.com/@erlangcafe
- status
- ok
- fetched_at
- 2026-07-29 02:57:49