# Installation Guide This guide covers installing dependencies and building `fiwi_monitor` on different Linux distributions. ## Prerequisites The `fiwi_monitor` tool requires: - **Build tools**: GCC compiler, autotools (autoconf, automake, libtool) - **Development libraries**: libpcap, libnl3 (for WiFi monitor mode) - **Package configuration**: pkg-config ## Fedora / RHEL / CentOS ### Install Dependencies ```bash sudo dnf install -y \ gcc \ autoconf \ automake \ libtool \ libpcap-devel \ libnl3-devel \ pkg-config ``` ### Build ```bash # Generate configure script ./autogen.sh # Configure build ./configure # Build make # Install (optional, system-wide) sudo make install ``` ## Debian / Ubuntu / Raspberry Pi OS ### Install Dependencies ```bash sudo apt-get update sudo apt-get install -y \ build-essential \ autoconf \ automake \ libtool \ libpcap-dev \ libnl-genl-3-dev \ libnl-3-dev \ pkg-config ``` ### Build ```bash # Generate configure script ./autogen.sh # Configure build ./configure # Build make # Install (optional, system-wide) sudo make install ``` ## Verification After installation, verify the libraries are available: ```bash # Check libpcap pkg-config --exists libpcap && echo "libpcap: OK" || echo "libpcap: MISSING" # Check libnl-genl-3.0 pkg-config --exists libnl-genl-3.0 && echo "libnl-genl-3.0: OK" || echo "libnl-genl-3.0: MISSING" # Check libnl-3.0 pkg-config --exists libnl-3.0 && echo "libnl-3.0: OK" || echo "libnl-3.0: MISSING" ``` ## Troubleshooting ### Package Not Found (Fedora) If `libnl3-devel` is not found, try: ```bash # Search for available packages dnf search libnl # May need to enable additional repositories sudo dnf install epel-release ``` ### Package Not Found (Debian/Ubuntu) If packages are not found: ```bash # Update package lists sudo apt-get update # Search for packages apt-cache search libnl apt-cache search libpcap ``` ### Configure Fails If `./configure` fails with "Package requirements not met": 1. **Verify packages are installed:** ```bash # Fedora rpm -qa | grep libnl rpm -qa | grep libpcap # Debian/Ubuntu dpkg -l | grep libnl dpkg -l | grep libpcap ``` 2. **Check pkg-config can find them:** ```bash pkg-config --modversion libpcap pkg-config --modversion libnl-genl-3.0 pkg-config --modversion libnl-3.0 ``` 3. **If pkg-config can't find them, check PKG_CONFIG_PATH:** ```bash # Common locations export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig ./configure ``` ### Build Errors If you get compilation errors: 1. **Missing headers:** ```bash # Fedora - install kernel headers if needed sudo dnf install kernel-devel # Debian/Ubuntu sudo apt-get install linux-headers-$(uname -r) ``` 2. **Linker errors:** - Ensure development packages (with `-devel` or `-dev` suffix) are installed - Not just runtime libraries ## Quick Start Once built, run the monitor tool: ```bash # Run as root (required for monitor mode) sudo ./src/wireless_monitor wlan0 11 # Or after installation sudo wireless_monitor wlan0 11 ``` ## Package Names Reference | Component | Fedora/RHEL | Debian/Ubuntu | |-----------|-------------|---------------| | C Compiler | `gcc` | `build-essential` | | Autoconf | `autoconf` | `autoconf` | | Automake | `automake` | `automake` | | Libtool | `libtool` | `libtool` | | libpcap | `libpcap-devel` | `libpcap-dev` | | libnl-genl-3 | `libnl3-devel` | `libnl-genl-3-dev` | | libnl-3 | `libnl3-devel` | `libnl-3-dev` | | pkg-config | `pkg-config` | `pkg-config` | Note: On Fedora, `libnl3-devel` provides both `libnl-3.0` and `libnl-genl-3.0` pkg-config files.