-
-
Notifications
You must be signed in to change notification settings - Fork 8
Building for Ubuntu 22
Brett Terpstra edited this page Aug 15, 2026
·
1 revision
Use this when you need an Apex binary that runs on Ubuntu 22.04 (Jammy). Building on a newer host (macOS, Ubuntu 24.04, etc.) can produce a binary that fails on 22.04 because of a newer glibc.
Run the command from the Apex repository root. Docker must be installed and running.
This is the usual target for Linux servers:
docker run --rm \
--platform linux/amd64 \
-v "$(pwd):/workspace" \
-w /workspace \
ubuntu:22.04 \
bash -c 'apt-get update && apt-get install -y build-essential cmake git libyaml-dev pkg-config && git submodule update --init --recursive && cmake -S . -B build-ubuntu-22 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -Wno-dev && cmake --build build-ubuntu-22 --target apex_cli -j$(nproc)'The CLI binary is written to build-ubuntu-22/apex.
On Apple Silicon, omit --platform linux/amd64 to build a native ARM64 Ubuntu 22 binary instead:
docker run --rm \
-v "$(pwd):/workspace" \
-w /workspace \
ubuntu:22.04 \
bash -c 'apt-get update && apt-get install -y build-essential cmake git libyaml-dev pkg-config && git submodule update --init --recursive && cmake -S . -B build-ubuntu-22 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -Wno-dev && cmake --build build-ubuntu-22 --target apex_cli -j$(nproc)'./build-ubuntu-22/apex --version
file build-ubuntu-22/apexOn the Ubuntu 22 host, file should report an ELF binary for the architecture you built (x86-64 or ARM aarch64).
See Installation for native source builds and other platforms.
Copyright 2025 Brett Terpstra, All Rights Reserved | MIT License
- Getting Started - Your first steps with Apex
- Installation - How to build and install Apex
- Building for Ubuntu 22 - Docker build for an Ubuntu 22.04 binary
- Usage - Basic usage examples
- Syntax - Complete syntax reference for unified mode
- Callouts - All supported callout formats and flag requirements
- Tables - Complete table syntax reference including rowspan, colspan, alignment, and captions
- Inline Attribute Lists - IALs and ALDs guide with examples
- Modes - Understanding processor modes
-
Quarto Mode - Pandoc/Quarto markdown (
--mode quarto) - Command Line Options - All CLI flags explained
-
Rendering Markdown in the Terminal - Terminal output (
-t terminal,-t terminal256), themes, pagination (-p,--paginate-symbols), inline images, and--width -
Generating Man Pages - Generate man pages from Markdown using
apex -t man -
Multi-file Documents - Combining multiple files with
--combine,--mmd-merge, and includes - Citations - Citations and bibliography guide
- Indices - Index generation with mmark and TextIndex syntax
-
Metadata Transforms - Transform metadata values with
[%key:transform] - Integrating with Pandoc - Use Apex with Pandoc for DOCX, PDF, and more
- Using Apex with Jekyll - Use the apex-ruby gem as Jekyll’s Markdown converter (untested; feedback welcome)
- Header IDs - How header IDs are generated
- C API - Programmatic API documentation
- Writing Tests - How to add tests for new features
- Xcode Integration - Using Apex in Xcode projects
- Examples - Practical usage examples
- Plugins - Plugin system, examples, and recipes
- Filters - AST filters (Pandoc-style JSON), examples, and usage
- Troubleshooting - Common issues and solutions
- Credits - Acknowledgments and links to related projects