Welcome to the Streamlit community and thanks for sharing your detailed question and repo link!
You’re running into a known issue: the expired bullseye-security repository is causing apt installs (via packages.txt) to fail, which then breaks OpenCV and MediaPipe since they need system libraries like libGL.so.1. This is a Streamlit Community Cloud infrastructure problem, not something you can fix from your end by tweaking packages.txt or requirements.txt alone. Removing packages.txt lets the build proceed, but then OpenCV fails due to missing system libraries, as you’ve seen.
The best practice is to keep only libgl1 in your packages.txt for OpenCV, and avoid adding libglib2.0-0 or similar, since those often fail due to missing dependencies in the current environment. However, when the underlying Debian repository is expired or misconfigured, even this won’t work. In these cases, the only workaround is to wait for the Streamlit team to update their base image or repository configuration. Deleting and redeploying the app sometimes helps if the issue is transient, but with an expired repo, it won’t resolve until Streamlit updates their infrastructure. For more, see the official docs and community troubleshooting threads: Streamlit Docs: App dependencies, libGL.so.1 troubleshooting, and community forum discussions.
Sources: