Linux x86_64

How to install Roc

In order to develop in Roc, you need to install the Roc CLI, which includes the Roc compiler and some helpful utilities.

  1. Download the latest nightly from the assets here.

  2. Untar the archive:

    tar -xf roc_nightly-linux_x86_64-latest.tar.gz
    cd roc_night<TAB TO AUTOCOMPLETE>
    
  3. To be able to run the roc command anywhere on your system; add the line below to your shell startup script (.profile, .zshrc, ...):

    export PATH=$PATH:~/path/to/roc_nightly-linux_x86_64-<VERSION>
    
  4. Check everything worked by executing roc version

  5. If you'd like to use the repl (roc repl); install libc development files and ld (binutils) :

    • On Ubuntu/Debian:
    sudo apt install libc-dev binutils
    
    • On ArchLinux/Manjaro:
    sudo pacman -S glibc binutils
    
    • on Fedora:
    sudo dnf install glibc-devel binutils
    
  6. Download and run hello world:

    curl -OL https://raw.githubusercontent.com/roc-lang/examples/refs/heads/main/examples/HelloWorld/main.roc
    roc main.roc
    

Next Steps