Skip to content

Commit 343ef02

Browse files
committed
improvements to the binary installation
1 parent 9aa7e0a commit 343ef02

File tree

2 files changed

+202
-77
lines changed

2 files changed

+202
-77
lines changed
Lines changed: 197 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,209 @@
1-
# Install Open Libra CLI pre-built binary
2-
3-
Although it is recommended that users build the the libra CLI tool from source themselves
4-
[(see this page for details)](./install-open-libra-cli.md),
5-
a selection of pre-built binaries are generated by the project's GitHub repository's CI workflows.
6-
These binaries cover the following
7-
platforms: macos, Linux, Windows and the following CPU architectures: x64 (Intel/AMD) and arm64.
8-
9-
**Warning**:
10-
Exercise caution when downlading executable binary files. If you are not
11-
familiar with computer security do not do this without seeking advice from someone who is.
12-
13-
Note: due to limited test coverage on platforms other than Linux/x64 it is not recommended
14-
to use these binary files for Libra node deployments (usage other than for CLI purposes).
15-
16-
## Installation
17-
Visit the
18-
[releases page](https://github.com/0LNetworkCommunity/libra-framework/releases) and identify the
19-
appropriate binary file for your computer. Download the file then follow platform-specific instructions
20-
and notes below:
21-
22-
### macos
23-
24-
Note that to use macos pre-built binaries currently, the computer must already have the
25-
[homebrew package manager](https://brew.sh/) installed. \
26-
This is required in order to install a necessary dependency (openssl).
27-
28-
The downloaded file is a "bare binary executable" (rather than an installable package) and as such requires
29-
additional steps to be usable:
30-
31-
1. Copy the downloladed file to a suitable directory on the shell's path, e.g. `~/bin`, while also change the filename to `libra`:
32-
```
33-
% cp ~/Downloads/libra-macos-arm64 ~/bin/libra
34-
```
35-
1. Downloaded files are quarantined, meaning macos will not allow such a file to be run. This is done
36-
to protect the user from inadvertently downloading and running malicious software. The quarantine status
37-
can be removed with a command like this:
38-
```
39-
% xattr -dr com.apple.quarantine ~/bin/libra
40-
```
41-
1. `libra` requires that the brew package "openssl" is installed. This can be done using homebrew:
42-
```
43-
% brew install openssl
44-
```
45-
1. Check that `libra` runs (this should print CLI tool version information without errors):
1+
---
2+
sidebar_label: From Pre-built Binaries
3+
---
4+
5+
import Tabs from '@theme/Tabs';
6+
import TabItem from '@theme/TabItem';
7+
8+
# Install Open Libra CLI From Pre-built Binary
9+
10+
This guide covers installing pre-built binaries of the Open Libra CLI tool across macOS, Linux, and Windows platforms.
11+
12+
## Supported Platforms
13+
14+
| Platform | Architectures | Notes |
15+
|----------|--------------|-------|
16+
| macOS | x64 (Intel), arm64 (Apple Silicon) | Requires Homebrew |
17+
| Linux | x64, arm64 | Built on Ubuntu 24.04 |
18+
| Windows | x64 only | arm64 runs via emulation |
19+
20+
:::warning
21+
**Pre-built binaries carry inherent security risks.**
22+
- For production environments or maximum security, [build from source](./install-open-libra-cli.md)
23+
- Only download from `https://github.com/0LNetworkCommunity/libra-framework/releases` (under Assets)
24+
:::
25+
26+
## Download Instructions
27+
28+
### 1. Check Your Architecture
29+
30+
<Tabs>
31+
<TabItem value="unix" label="macOS/Linux" default>
32+
33+
```bash
34+
uname -m
35+
```
36+
37+
**Results:**
38+
- `x86_64` = Download x64 binary
39+
- `arm64` or `aarch64` = Download arm64 binary
40+
41+
</TabItem>
42+
<TabItem value="windows" label="Windows">
43+
44+
```powershell
45+
wmic os get osarchitecture
46+
```
47+
48+
**Results:**
49+
- `64-bit` = Download x64 binary
50+
- `32-bit` = Not supported
51+
52+
</TabItem>
53+
</Tabs>
54+
55+
### 2. Download the Binary
56+
57+
1. Visit the [official releases page](https://github.com/0LNetworkCommunity/libra-framework/releases)
58+
2. Find the latest release
59+
3. Download the appropriate binary:
60+
61+
| System | File to Download |
62+
|--------|------------------|
63+
| Intel Mac | `libra-macos-x64` |
64+
| Apple Silicon Mac (M1/M2/M3/M4) | `libra-macos-arm64` |
65+
| Standard Linux | `libra-linux-x64` |
66+
| ARM Linux (Raspberry Pi) | `libra-linux-arm64` |
67+
| Windows | `libra-windows-x64.exe` |
68+
69+
## Installation Instructions
70+
71+
<Tabs>
72+
<TabItem value="macos" label="macOS" default>
73+
74+
### Prerequisites
75+
- [Homebrew](https://brew.sh/) must be installed
76+
77+
### Steps
78+
79+
1. **Install OpenSSL dependency**:
80+
```bash
81+
brew install openssl
82+
```
83+
84+
2. **Move binary to PATH**:
85+
```bash
86+
# Create bin directory if it doesn't exist
87+
mkdir -p ~/bin
88+
89+
# Copy and rename the binary (replace arm64 with x64 if needed)
90+
cp ~/Downloads/libra-macos-arm64 ~/bin/libra
91+
```
92+
93+
3. **Remove quarantine** (macOS security feature):
94+
```bash
95+
xattr -dr com.apple.quarantine ~/bin/libra
96+
```
97+
98+
4. **Make executable**:
99+
```bash
100+
chmod +x ~/bin/libra
101+
```
102+
103+
5. **Add to PATH** (if ~/bin isn't already in PATH):
104+
```bash
105+
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc
106+
source ~/.zshrc
107+
```
108+
109+
6. **Verify installation**:
110+
```bash
111+
libra version
112+
```
113+
114+
</TabItem>
115+
<TabItem value="linux" label="Linux">
116+
117+
### Prerequisites
118+
- Ubuntu 24.04 or newer (for pre-built binaries)
119+
120+
### Steps
121+
122+
1. **Install OpenSSL dependency**:
123+
```bash
124+
sudo apt update
125+
sudo apt install openssl
126+
```
127+
128+
2. **Move binary to PATH**:
129+
```bash
130+
# Create bin directory if it doesn't exist
131+
mkdir -p ~/bin
132+
133+
# Copy and rename the binary (replace x64 with arm64 if needed)
134+
cp ~/Downloads/libra-linux-x64 ~/bin/libra
46135
```
47-
% libra version
136+
137+
3. **Make executable**:
138+
```bash
139+
chmod +x ~/bin/libra
48140
```
49141

50-
### Windows
142+
4. **Add to PATH** (if ~/bin isn't already in PATH):
143+
```bash
144+
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
145+
source ~/.bashrc
146+
```
51147

52-
Note that at present there is no arm64 version of the Windows binary file. However Windows arm64 machines will run
53-
the x64 version.
148+
5. **Verify installation**:
149+
```bash
150+
libra version
151+
```
54152

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

58-
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`:
59-
```
60-
C:\Users\anon>copy "Downloads\libra-windows-x64.exe" %HOMEPATH%\bin\libra.exe
61-
1 file(s) copied.
62-
```
63-
1. Check that `libra` runs (this should print CLI tool version information without errors):
160+
</TabItem>
161+
<TabItem value="windows" label="Windows">
162+
163+
### Native Windows
164+
165+
1. **Create directory for binary**:
166+
```powershell
167+
mkdir %HOMEPATH%\bin
64168
```
65-
C:\Users\anon> libra version
169+
170+
2. **Copy and rename**:
171+
```powershell
172+
copy "Downloads\libra-windows-x64.exe" %HOMEPATH%\bin\libra.exe
66173
```
67174

68-
### Linux
69-
70-
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.
71-
72-
1. Copy the downloladed file to a suitable directory on the shell's path, e.g. `~/bin`, while also change the filename to `libra`:
73-
```
74-
$ cp ~/Downloads/libra-linux-x64 ~/bin/libra
75-
```
76-
1. Mark the file executable:
77-
```
78-
$ chmod +x ~/bin/libra
79-
```
80-
1. `libra` requires that the brew package "openssl" is installed. This can be done using apt:
81-
```
82-
$ sudo apt install openssl
83-
```
84-
1. Check that `libra` runs (this should print CLI tool version information without errors):
175+
3. **Add to PATH**:
176+
- Open System Properties → Advanced → Environment Variables
177+
- Add `%HOMEPATH%\bin` to your PATH variable
178+
- Or via command line:
179+
```powershell
180+
setx PATH "%PATH%;%HOMEPATH%\bin"
85181
```
86-
$ libra version
182+
183+
4. **Verify installation**:
184+
```powershell
185+
libra version
87186
```
88187

188+
### Windows Subsystem for Linux (WSL2)
189+
190+
:::tip WSL2 Users
191+
For WSL2, use the Linux binary:
192+
1. Download the Linux binary (not Windows)
193+
2. Follow the Linux installation steps above
194+
:::
195+
196+
</TabItem>
197+
</Tabs>
198+
199+
## Troubleshooting
200+
201+
### Common Issues
202+
203+
| Problem | Solution |
204+
|---------|----------|
205+
| "command not found" | Ensure the binary location is in your PATH |
206+
| "Permission denied" | Make the file executable: `chmod +x libra` |
207+
| "cannot execute binary file" | Wrong architecture - check your system architecture |
208+
| OpenSSL errors | Install OpenSSL for your platform |
209+
| "bad CPU type" (macOS) | Download the correct architecture (x64 vs arm64) |

docs/getting-started/install-open-libra-cli/install-open-libra-cli.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
---
2+
sidebar_label: From Source
3+
---
4+
15
import Tabs from '@theme/Tabs';
26
import TabItem from '@theme/TabItem';
37

4-
# Install Open Libra CLI from source
8+
# Install Open Libra CLI From Source
59

610
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.
711

0 commit comments

Comments
 (0)