This Bash script automates the end-to-end process of installing the latest version of Anki on a Debian-based Linux system (like Ubuntu or Debian). It handles dependency resolution, version fetching, and execution of the official installation binaries.
- Dynamic Versioning: Queries the GitHub API for the latest release tag, extracting only the major.minor version (e.g.
25.09) to match the launcher archive naming convention. - Dependency Management: Automatically installs required system libraries (
libxcb,zstd, etc.) viaaptto ensure the Qt6 interface runs correctly. - Pre-installation Checks: Verifies if Anki is already present on the system to prevent redundant or conflicting installations.
- Error Handling: Includes exit codes at every major step (dependency installation, download, extraction, installation) to provide clear feedback if something goes wrong.
- Clean Workflow: Downloads, extracts, and executes the official
install.shfrom the Anki launcher archive in a single pass.
- Operating System: Debian, Ubuntu, or any derivative using the
aptpackage manager. - Utilities:
curl,wget, andtar(usually pre-installed). - Privileges:
sudoaccess is required for installing dependencies and the final application binary.
- Download or clone the script:
git clone https://github.com/orionilloc/ankiinstall.sh.git- Make it executable:
chmod +x ankiinstall.sh- Run the script:
./ankiinstall.sh- Version Check: Queries the GitHub API for the latest release tag and trims it to major.minor.
- Duplicate Check: Confirms the
ankicommand is not already in your$PATH. - Dependency Install: Installs
libxcb-xinerama0,libxcb-cursor0, andzstdviaapt. - Download: Pulls the launcher
.tar.zstarchive into~/Downloads. - Extraction: Unpacks the Zstandard-compressed archive.
- Finalize: Navigates into the extracted directory and runs the official
sudo ./install.sh.