fix "the dependency requires Elixir ~> 1.16 but you are running on v1.14" on Ubuntu
#####################################################################################

:author: Russell Ballestrini
:slug: dependency-requires-elixir-1-16-but-running-1-14-ubuntu
:date: 2026-03-18 17:00
:tags: Code, Elixir, DevOps, Opinion
:status: published
:summary: Ubuntu 24.04 ships Elixir 1.14 & OTP 25 but the Phoenix dependency tree requires 1.15+. Here's what to do about it & why Ubuntu 26.04 fixes everything.

If you run a Phoenix project on Ubuntu 24.04, you've seen these:

.. code-block:: text

    warning: the dependency :swoosh requires Elixir "~> 1.16" but you are running on v1.14.0
    warning: the dependency :ecto_sqlite3 requires Elixir "~> 1.15" but you are running on v1.14.0
    warning: the dependency :uri_query requires Elixir "~> 1.16" but you are running on v1.14.0

They compile. They pass tests. So you ignore them. I ignored them for months. Then I turned on ``--warnings-as-errors`` & my CI went red.

|

the problem
===========

Ubuntu 24.04 ships Erlang/OTP 25 & Elixir 1.14. The Hex ecosystem moved to 1.15+ & 1.16+ minimums throughout 2025. Phoenix 1.7 still compiles on 1.14, but its dependency tree doesn't agree.

The warnings mean: "this works today by accident, not by contract." That gap closes without notice the next time you ``mix deps.update``.

|

what actually fixes it
======================

Ubuntu 26.04 LTS drops April 23, 2026. I checked the package archive:

- **Erlang/OTP 27.3** (``1:27.3.4.6+dfsg-1``)
- **Elixir 1.18.3** (``1.18.3.dfsg-1build1``)

Every version warning disappears. ``apt install erlang elixir`` on 26.04 gives you a supported toolchain with zero third-party repos.

|

recommendations
================

**1. Don't chase the warnings today.** Without ``--warnings-as-errors`` they stay cosmetic. Production releases compile with ``MIX_ENV=prod`` which skips the test deps that generate most of these anyway.

**2. Don't add PPAs for Elixir.** Third-party repos on CI runners create invisible dependencies. When they lag or drop your distro, your pipeline breaks & you don't know why.

**3. If you need --warnings-as-errors now, pin your deps.** Older versions of swoosh, ecto_sqlite3, & uri_query support Elixir 1.14. Stop running ``mix deps.update`` until you're ready to upgrade.

**4. Plan for 26.04.** Test against Elixir 1.18 & OTP 27 locally before the server upgrade. The jump from OTP 25 to 27 changes some behaviors (``rebar3_lint`` needs OTP 26+, ``Process.set_label/1`` exists now).

**5. Separate build from deploy.** The build server's Elixir version doesn't need to match production's Erlang — only the ERTS version baked into the release matters.

|

This happens every LTS cycle. Ubuntu 22.04 shipped Python 3.10 while the ecosystem ran on 3.11. The pattern repeats because LTS freezes & ecosystems don't. Five weeks. Then ``apt install elixir`` does what it should have done all along.
