AnyBot/docs/en/install.md

28 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Install details (English summary)
Canonical document: [docs/install.md](../install.md) (Chinese).
`install.sh` does four steps: system packages (per-distro names: apt/dnf/pacman/zypper), toolchain (rustup → `~/.cargo`; Docker for the server mode), sources into `~/AnyBot`, then build + install. No root for the app; it picks desktop vs. hands automatically (Mac / Linux-with-desktop → app, headless Linux → hands). Low-RAM machines compile with fewer parallel jobs (one per 2 GB). Env: `ANYBOT_DIR`, `ANYBOT_BRANCH`.
## Requirements
| Platform | Needs |
|---|---|
| All | Rust **≥ 1.95** via rustup (apt's is too old), git, make, C compiler |
| macOS ≥ 12 | Xcode Command Line Tools (`xcode-select --install`) |
| Linux | `build-essential pkg-config libasound2-dev` (+ X11/Wayland, notify, clipboard libs — install.sh installs them) |
| Windows | VS Build Tools (C++); `cargo build --release` works, installer packaging is not done |
## Make targets
`make deps` (system packages + Rust, one time) · `make` (build) · `make install` (Mac → `~/Applications/AnyBot.app`, Linux → `~/.local/bin/anybot` + menu entry) · `make run` · `make test` · `make doctor` (what's missing on this machine) · `make serve` (headless) · `make setup` (pair this machine to your brain) · `make server` (host the account server here) · `make dist` (release archives into `dist/`) · `make relay` (build the relay alone).
## FAQ
- **`Killed` / `signal: 9` while compiling** — out of memory; add swap: `sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile`.
- **`requires rustc 1.95`** — `rustup update stable`; don't use the distro's rustc.
- **`alsa` / `pkg-config` not found** — `make deps`.
- **Mac: "cannot verify developer"** — right-click the app › Open, once.
- **Server URL unreachable** — DNS A record? ports 80/443 open? `cd ~/AnyBot/deploy/server && docker compose logs caddy`.
- **Uninstall** — `make uninstall` removes the program, keeps your bots and chats.