Skip to content

Commit db93ea8

Browse files
author
Clawd
committed
docs/install: add explicit Linux build dependencies and installer prereq checks
1 parent 1b89bd7 commit db93ea8

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ Leash fixes that.
3232

3333
## Quick Start
3434

35+
### Prerequisites (Linux)
36+
37+
- Rust toolchain (`cargo`, `rustc`) via `rustup`
38+
- C toolchain/linker (`cc`/`gcc`)
39+
- `pkg-config`
40+
- OpenSSL development headers (`libssl-dev` on Debian/Ubuntu)
41+
42+
Ubuntu/Debian example:
43+
44+
```bash
45+
sudo apt-get update
46+
sudo apt-get install -y build-essential pkg-config libssl-dev
47+
# then install rustup from https://rustup.rs
48+
```
49+
3550
```bash
3651
# Install from source
3752
cargo install --path .

scripts/install.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,25 @@ if ! command -v cargo &> /dev/null; then
1717
exit 1
1818
fi
1919

20+
# Check build toolchain prerequisites
21+
if ! command -v cc &> /dev/null && ! command -v gcc &> /dev/null && ! command -v clang &> /dev/null; then
22+
echo "A C compiler/linker is required (cc/gcc/clang)."
23+
echo "On Ubuntu/Debian: sudo apt-get install -y build-essential"
24+
exit 1
25+
fi
26+
27+
if ! command -v pkg-config &> /dev/null; then
28+
echo "pkg-config is required."
29+
echo "On Ubuntu/Debian: sudo apt-get install -y pkg-config"
30+
exit 1
31+
fi
32+
33+
if [[ ! -f /usr/include/openssl/ssl.h ]] && [[ ! -f /usr/local/include/openssl/ssl.h ]]; then
34+
echo "OpenSSL development headers are required (ssl.h not found)."
35+
echo "On Ubuntu/Debian: sudo apt-get install -y libssl-dev"
36+
exit 1
37+
fi
38+
2039
# Check for Linux
2140
if [[ "$(uname)" != "Linux" ]]; then
2241
echo "⚠️ Leash currently supports Linux only. macOS support coming in v0.2."

0 commit comments

Comments
 (0)