Flutter needs replit hosting OS linux version >= 3.19

Problem description:
replit linux hosting configuration not compatible with NIX flutter package

Expected behavior:
when flutter dependence added to replit.nix, flutter commands are usable

Actual behavior:
linux system error message
requires linux version >= 3.19 build with CONFIG _USER_NS

Steps to reproduce:
add flutter dependency in replit.nix
simply open replit shell and type any flutter command (flutter doctor by example )
you have the same issue for any version of nix store put in your .replit file, so for any of the flutter package of nix store (flutter or flutter2)

Bug appears at this link:
for any repl

any browser/OS/device
it is an internal linux hosting configuration issue at replit side

1 Like

Hello, Dominique.

The Nix version of flutter creates a file-hierarchy-system environment (fhs-env) that wraps the flutter binaries. Unfortunately, this fhs-env is not supported on Repl containers because unshare is not available in nested unprivileged containers.

I’ve made a Repl that lets flutter doctor work by not wrapping it in the FHS-env, however, I’m not sure what else might break without the fhs-env. Note, this is a hack because I’ve copied the nix store path directly into the PATH environment variable, so if you update the Nix channel later, the flutter version will not automatically update.


Let us know how it goes!


1 Like

Hi Ryan,

I’ve forked your REPL.
I have added the minimal configuration and 2 executable scripts to test your hack with the basic first flutter app created with « flutter create namer » => sea start of readme.md (setenv.sh to setup environment + runflutter.sh to build web app & run/serve it via python http.server)

=> don’t use RUN button => always use command line in the shell please


I have an issue when building flutter app => in the second phase, you get a tremendous of offset issues (use CTRL+C to stop this consuming loop) => may you take some time to search a second workaround for your ingenious hack ?

For your information, I code via an old IPad to test possibilities to offer an affordable way to develop a flutter app (even other) via REPLIT (so using browser only on low-end personnal infrastructure)

Many thanks in advance.

Kind Regards,