Step 3: System Libraries & Build Tools
Time: 8 minutes
Purpose: Install essential libraries and compilers needed for development tools
macOS - Build Tools & OpenSSL
Xcode Command Line Tools: Install via xcode-select --install
or from Apple Developer
Additional tools via Homebrew: See brew.sh for Homebrew installation
Quick Install
# Install Xcode Command Line Tools (includes basic build tools)
xcode-select --install
# Install additional development libraries via Homebrew
brew install openssl@3 pkg-config cmake gcc
Critical: Apple Silicon OpenSSL Configuration
Apple Silicon Macs require additional OpenSSL environment setup:
# Add these environment variables to your shell profile
echo 'export OPENSSL_DIR=/opt/homebrew/opt/openssl@3' >> ~/.zshrc
echo 'export PKG_CONFIG_PATH=/opt/homebrew/opt/openssl@3/lib/pkgconfig:$PKG_CONFIG_PATH' >> ~/.zshrc
echo 'export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib $LDFLAGS"' >> ~/.zshrc
echo 'export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include $CPPFLAGS"' >> ~/.zshrc
# Reload shell configuration
source ~/.zshrc
Why this matters: Many development tools need to compile native dependencies. Without proper OpenSSL configuration, you'll get compilation errors.
Windows - Build Tools
Installation: Follow the official guide at Visual Studio Downloads
Tool | Official Documentation | Purpose |
---|---|---|
Visual Studio Build Tools | docs.microsoft.com/cpp/build | C++ compiler and build tools |
CMake | cmake.org/download | Cross-platform build system |
Quick Install (Chocolatey)
# Install build tools with Chocolatey (PowerShell 7 as Administrator)
choco install visualstudio2022buildtools cmake -y
# Refresh environment
refreshenv
Note: Restart PowerShell after installation for PATH updates.
Linux - Build Essentials
Documentation: Each distribution includes build tools in their repositories.
Distribution | Package Manager | Official Documentation |
---|---|---|
Ubuntu/Debian | APT | help.ubuntu.com |
Fedora/RHEL | DNF | docs.fedoraproject.org |
Quick Install
# Ubuntu/Debian
sudo apt update
sudo apt install build-essential libssl-dev pkg-config cmake git curl
# Fedora/RHEL/CentOS
sudo dnf update
sudo dnf install gcc gcc-c++ make openssl-devel pkgconfig cmake git curl
Verification
macOS/Linux
# Check OpenSSL is properly configured
pkg-config --modversion openssl # Should show version number
# Check compiler is available
gcc --version # Should show GCC version
# Check build tools
cmake --version
Windows
# Check if Visual Studio compiler is available
where cl # Should find the compiler
# Check if tools are in PATH
cmake --version
Troubleshooting
macOS: "Could not find directory of OpenSSL installation"
This is a common issue. Make sure you've added the environment variables and restarted your terminal:
# Check if variables are set
echo $OPENSSL_DIR # Should show: /opt/homebrew/opt/openssl@3
echo $PKG_CONFIG_PATH # Should include OpenSSL path
# If not set, add them and reload:
source ~/.zshrc
Windows: "Compiler not found"
Restart your terminal/PowerShell after installing Build Tools. If still having issues, you may need to run from "Developer Command Prompt" or "Developer PowerShell" from the Start menu.
Linux: Package installation fails
Update your package manager first:
sudo apt update # Ubuntu/Debian
sudo dnf update # Fedora/RHEL/CentOS