Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,88 +1,209 @@
# Install Open Libra CLI pre-built binary

Although it is recommended that users build the the libra CLI tool from source themselves
[(see this page for details)](./install-open-libra-cli.md),
a selection of pre-built binaries are generated by the project's GitHub repository's CI workflows.
These binaries cover the following
platforms: macos, Linux, Windows and the following CPU architectures: x64 (Intel/AMD) and arm64.

**Warning**:
Exercise caution when downlading executable binary files. If you are not
familiar with computer security do not do this without seeking advice from someone who is.

Note: due to limited test coverage on platforms other than Linux/x64 it is not recommended
to use these binary files for Libra node deployments (usage other than for CLI purposes).

## Installation
Visit the
[releases page](https://github.com/0LNetworkCommunity/libra-framework/releases) and identify the
appropriate binary file for your computer. Download the file then follow platform-specific instructions
and notes below:

### macos

Note that to use macos pre-built binaries currently, the computer must already have the
[homebrew package manager](https://brew.sh/) installed. \
This is required in order to install a necessary dependency (openssl).

The downloaded file is a "bare binary executable" (rather than an installable package) and as such requires
additional steps to be usable:

1. Copy the downloladed file to a suitable directory on the shell's path, e.g. `~/bin`, while also change the filename to `libra`:
```
% cp ~/Downloads/libra-macos-arm64 ~/bin/libra
```
1. Downloaded files are quarantined, meaning macos will not allow such a file to be run. This is done
to protect the user from inadvertently downloading and running malicious software. The quarantine status
can be removed with a command like this:
```
% xattr -dr com.apple.quarantine ~/bin/libra
```
1. `libra` requires that the brew package "openssl" is installed. This can be done using homebrew:
```
% brew install openssl
```
1. Check that `libra` runs (this should print CLI tool version information without errors):
---
sidebar_label: From Pre-built Binaries
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Install Open Libra CLI From Pre-built Binary

This guide covers installing pre-built binaries of the Open Libra CLI tool across macOS, Linux, and Windows platforms.

## Supported Platforms

| Platform | Architectures | Notes |
|----------|--------------|-------|
| macOS | x64 (Intel), arm64 (Apple Silicon) | Requires Homebrew |
| Linux | x64, arm64 | Built on Ubuntu 24.04 |
| Windows | x64 only | arm64 runs via emulation |

:::warning
**Pre-built binaries carry inherent security risks.**
- For production environments or maximum security, [build from source](./install-open-libra-cli.md)
- Only download from `https://github.com/0LNetworkCommunity/libra-framework/releases` (under Assets)
:::

## Download Instructions

### 1. Check Your Architecture

<Tabs>
<TabItem value="unix" label="macOS/Linux" default>

```bash
uname -m
```

**Results:**
- `x86_64` = Download x64 binary
- `arm64` or `aarch64` = Download arm64 binary

</TabItem>
<TabItem value="windows" label="Windows">

```powershell
wmic os get osarchitecture
```

**Results:**
- `64-bit` = Download x64 binary
- `32-bit` = Not supported

</TabItem>
</Tabs>

### 2. Download the Binary

1. Visit the [official releases page](https://github.com/0LNetworkCommunity/libra-framework/releases)
2. Find the latest release
3. Download the appropriate binary:

| System | File to Download |
|--------|------------------|
| Intel Mac | `libra-macos-x64` |
| Apple Silicon Mac (M1/M2/M3/M4) | `libra-macos-arm64` |
| Standard Linux | `libra-linux-x64` |
| ARM Linux (Raspberry Pi) | `libra-linux-arm64` |
| Windows | `libra-windows-x64.exe` |

## Installation Instructions

<Tabs>
<TabItem value="macos" label="macOS" default>

### Prerequisites
- [Homebrew](https://brew.sh/) must be installed

### Steps

1. **Install OpenSSL dependency**:
```bash
brew install openssl
```

2. **Move binary to PATH**:
```bash
# Create bin directory if it doesn't exist
mkdir -p ~/bin

# Copy and rename the binary (replace arm64 with x64 if needed)
cp ~/Downloads/libra-macos-arm64 ~/bin/libra
```

3. **Remove quarantine** (macOS security feature):
```bash
xattr -dr com.apple.quarantine ~/bin/libra
```

4. **Make executable**:
```bash
chmod +x ~/bin/libra
```

5. **Add to PATH** (if ~/bin isn't already in PATH):
```bash
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
```

6. **Verify installation**:
```bash
libra version
```

</TabItem>
<TabItem value="linux" label="Linux">

### Prerequisites
- Ubuntu 24.04 or newer (for pre-built binaries)

### Steps

1. **Install OpenSSL dependency**:
```bash
sudo apt update
sudo apt install openssl
```

2. **Move binary to PATH**:
```bash
# Create bin directory if it doesn't exist
mkdir -p ~/bin

# Copy and rename the binary (replace x64 with arm64 if needed)
cp ~/Downloads/libra-linux-x64 ~/bin/libra
```
% libra version

3. **Make executable**:
```bash
chmod +x ~/bin/libra
```

### Windows
4. **Add to PATH** (if ~/bin isn't already in PATH):
```bash
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
```

Note that at present there is no arm64 version of the Windows binary file. However Windows arm64 machines will run
the x64 version.
5. **Verify installation**:
```bash
libra version
```

The binary files are native Windows executables. Note however that WSL2 users may install and use the relevant Linux
binary for use within the WSL2 environment (see Linux instructions below).
:::info Ubuntu 22.04 and Older
The pre-built binaries require Ubuntu 24.04. For older versions:
- Build from source (recommended)
- Use Docker/containerization
- Upgrade to Ubuntu 24.04
:::

1. Copy the downloladed file to a suitable directory on the shell's path, e.g. `%HOMEPATH%\bin`, while also change the filename to `libra.exe`:
```
C:\Users\anon>copy "Downloads\libra-windows-x64.exe" %HOMEPATH%\bin\libra.exe
1 file(s) copied.
```
1. Check that `libra` runs (this should print CLI tool version information without errors):
</TabItem>
<TabItem value="windows" label="Windows">

### Native Windows

1. **Create directory for binary**:
```powershell
mkdir %HOMEPATH%\bin
```
C:\Users\anon> libra version

2. **Copy and rename**:
```powershell
copy "Downloads\libra-windows-x64.exe" %HOMEPATH%\bin\libra.exe
```

### Linux

Note that currently binary files are built on Ubuntu 24.04. This means they are not compatible with older Ubuntu releases such as 22.04.

1. Copy the downloladed file to a suitable directory on the shell's path, e.g. `~/bin`, while also change the filename to `libra`:
```
$ cp ~/Downloads/libra-linux-x64 ~/bin/libra
```
1. Mark the file executable:
```
$ chmod +x ~/bin/libra
```
1. `libra` requires that the brew package "openssl" is installed. This can be done using apt:
```
$ sudo apt install openssl
```
1. Check that `libra` runs (this should print CLI tool version information without errors):
3. **Add to PATH**:
- Open System Properties → Advanced → Environment Variables
- Add `%HOMEPATH%\bin` to your PATH variable
- Or via command line:
```powershell
setx PATH "%PATH%;%HOMEPATH%\bin"
```
$ libra version

4. **Verify installation**:
```powershell
libra version
```

### Windows Subsystem for Linux (WSL2)

:::tip WSL2 Users
For WSL2, use the Linux binary:
1. Download the Linux binary (not Windows)
2. Follow the Linux installation steps above
:::

</TabItem>
</Tabs>

## Troubleshooting

### Common Issues

| Problem | Solution |
|---------|----------|
| "command not found" | Ensure the binary location is in your PATH |
| "Permission denied" | Make the file executable: `chmod +x libra` |
| "cannot execute binary file" | Wrong architecture - check your system architecture |
| OpenSSL errors | Install OpenSSL for your platform |
| "bad CPU type" (macOS) | Download the correct architecture (x64 vs arm64) |
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
sidebar_label: From Source
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Install Open Libra CLI from source
# Install Open Libra CLI From Source

This guide will walk you through installing the **Open Libra CLI** by building it from source. The CLI provides essential tools for interacting with the Open Libra network.

Expand Down