AnyBot/docs/en/install.md

28 lines
2.2 KiB
Markdown
Raw Normal View History

# Install details (English summary)
Canonical document: [docs/install.md](../install.md) (Chinese).
`install.sh` covers macOS (arm64, x86_64) and Linux of any common distro (apt, dnf, yum, pacman, zypper, apk, xbps — not Ubuntu only). `install.ps1` covers Windows 10/11 x64 and arm64. A terminal gets a short guide (desktop / hands / server) and first-run config (API key or pairing code). Agents: `sh install.sh --print` (one JSON line), then `ANYBOT_NONINTERACTIVE=1` — see [install/AGENT.md](../../install/AGENT.md). Server mode is any Linux with Docker. Hands: real screen on Mac and signed-in Windows, virtual screen (Xvfb) on headless Linux.
## 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 10/11 x64, arm64 | `install.ps1` (Git + VS Build Tools; winget installs them). Do not host the account server here |
## 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.