Problem setting up and running Redis in flox

I apologize in advance if this is a duplicate, but I’ve searched on github, and here and didn’t find a solution.

I’ve installed Redis on flox using the command.

flox install redis
flox activate

then after activating, when I try to run redis-cli or redis-server I get the error

redis-cli: error while loading shared libraries: /nix/store/p43qaa9zmc37q3q6kyi8f4b8jhsb3iz1-jemalloc-5.3.0/lib/ cannot allocate memory in static TLS block

Could you please help me resolve this issue. Thank you so much :man_bowing:

Edit: Here’s my flox configuration

it looks like it’s not happy with the jemalloc package. to help troubleshoot, which system type are you on?

for me on aarch64-darwin i’m able to create an environment with your manifest and use both redis-cli / redis-server without this error.

I am on x86_64-linux. (my os is tuxedo-os, based on ubuntu 22.04)

The jemalloc package was me trying to figure out how to solve this issue (the issue still persists if I uninstall the jemalloc package)

Other than installing the package and running flox activate have you done anything else? Maybe I am missing a step.

My apologies if I am missing to mention anything, please feel free to ask. Thank you so much.

can you send the error you get when you uninstall jemalloc?

Sure, this is the error I get.

redis-cli: error while loading shared libraries: /nix/store/p43qaa9zmc37q3q6kyi8f4b8jhsb3iz1-jemalloc-5.3.0/lib/ cannot allocate memory in static TLS block

I just want to note, this error even happens on a freshly initiated flox workspace after only just installing redis. So, this is not because of conflict between packages. I will try to research how to install older version of redis and confirm if it fixes the issue or not.

how much memory does your system have?

32gb, currently only 8gb being used.

Okay, I think we have a lead. Will get back to you soon

1 Like

will post our findings soon but as a workaround, can you try this:

common = """
  unset LD_AUDIT
1 Like

This worked like a charm. Can run both redis-server and redis-cli now

1 Like