Basics

Crystal Installation

Installing Crystal

Crystal installation uses package managers or binaries for setup.

System Requirements

Before installing Crystal, ensure your system meets the following requirements:

  • Operating System: Linux, macOS, or Windows (via WSL).
  • Dependencies: LLVM (version 10+) and libevent.
  • Permissions: Administrative privileges for package installation.

Installing Crystal on Linux

On Linux, you can install Crystal using package managers like Apt or Yum. Follow the instructions below for your distribution.

Using Apt (Debian/Ubuntu)

Using Yum (Fedora/RHEL/CentOS)

Installing Crystal on macOS

On macOS, you can use Homebrew, a popular package manager, to install Crystal:

Installing Crystal on Windows

Crystal can be installed on Windows using the Windows Subsystem for Linux (WSL). After setting up WSL with a Linux distribution, follow the Linux installation instructions.

Installing Crystal from Binaries

If you prefer not to use a package manager, you can download Crystal binaries from the official website:

  • Go to the Crystal installation page.
  • Download the appropriate binary for your operating system.
  • Follow the instructions provided to set up your environment.

Verifying the Installation

After installing Crystal, verify the installation by checking the version. Run the following command in your terminal:

If the installation is successful, you will see the Crystal version number displayed.