diff --git a/Dockerfile.bullseye b/Dockerfile.bullseye
index 0b0355feed284c89cac7f6b8f0adcfbd62b5740f..b01d966a4cbbe51dfe0b4897b4a20f3f5721e3a4 100644
--- a/Dockerfile.bullseye
+++ b/Dockerfile.bullseye
@@ -7,7 +7,7 @@ RUN apt-get -qq update && \
         sqlite3 locales-all git \
         python3 python3-venv python3-coverage python3-ldap3 python3-flask python3-flask-sqlalchemy python3-flask-migrate \
         python3-pip python3-qrcode python3-fido2 python3-oauthlib python3-flask-babel python3-pytest python3-all python3-pip \
-        git-buildpackage debhelper dh-python mariadb-server python3-mysqldb python3-requests-oauthlib python3-git && \
+        git-buildpackage debhelper dh-python mariadb-server python3-mysqldb python3-requests-oauthlib python3-git libffi-dev && \
     pip3 install pylint html5validator twine build --upgrade && \
     apt-get -qq clean
 
diff --git a/Dockerfile.buster b/Dockerfile.buster
index 274ec90c8185261ab50a60e973eadca3e95e7080..faef6db3ee354a4ba86ba3c86c2ccf3bf24a1f06 100644
--- a/Dockerfile.buster
+++ b/Dockerfile.buster
@@ -7,7 +7,7 @@ RUN apt-get -qq update && \
         sqlite3 locales-all git \
         python3 python3-venv python3-coverage python3-ldap3 python3-flask python3-flask-sqlalchemy python3-flask-migrate \
         python3-pip python3-qrcode python3-fido2 python3-oauthlib python3-flask-babel python3-pytest python3-all python3-pip \
-        git-buildpackage debhelper dh-python mariadb-server python3-mysqldb python3-flask-oauthlib python3-requests-oauthlib python3-git && \
+        git-buildpackage debhelper dh-python mariadb-server python3-mysqldb python3-flask-oauthlib python3-requests-oauthlib python3-git libffi-dev && \
     pip3 install pylint html5validator twine build --upgrade && \
     apt-get -qq clean