railwayapp / nixpacks

App source + Nix packages + Docker = Image
https://nixpacks.com
MIT License
2.36k stars 226 forks source link

Fix apt-get glibc error #984

Closed coffee-cup closed 9 months ago

coffee-cup commented 9 months ago

This PR fixes the "Missing Glibc 2.36" error when running anything with apt-get. The problem is that The LIBRARY_PATH header was set to ~/.nix-profile which includes packages built with glibc 2.36+. apt-get is built with glibc 2.35 since that is the default in Ubuntu. The problem is easily fixed by installing apt packages with sudo so that a different LIBRARY_PATH is used.

I've added an example that installs ffmpeg and a bunch of other stuff so we can catch this in the future.

Fixes https://github.com/railwayapp/nixpacks/issues/977