Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Prerequisites

Sage requires a C linker and OpenSSL headers for compilation. Rust is not required.

macOS:

xcode-select --install

Debian/Ubuntu:

sudo apt install gcc libssl-dev

Fedora/RHEL:

sudo dnf install gcc openssl-devel

Arch:

sudo pacman -S gcc openssl

Install Sage

Homebrew (macOS)

brew install sagelang/sage/sage

Quick Install (macOS/Linux)

curl -fsSL https://raw.githubusercontent.com/sagelang/sage/main/scripts/install.sh | bash

Cargo (if you have Rust)

cargo install sage-lang

Nix

nix profile install github:sagelang/sage

Verify Installation

sage --version

You should see output like:

sage 2.0.2

Next Steps

Now that Sage is installed, let’s write your first program: Hello World.