redisinstallationfatal-errorredis-server

How to fix 'unknown user 'redis' in statoverride file'


I'm installing redis, everytime I run this command sudo apt install redis-server I got an unrecoverable fatal error

I already tried many solutions to completly remove redis, redis-server, but nothing worked, this is the error

dpkg: unrecoverable fatal error, aborting: unknown user 'redis' in statoverride file E: Sub-process /usr/bin/dpkg returned an error code (2)


Solution

  • I solved it by opening the statoverride file using

    sudo nano /var/lib/dpkg/statoverride
    

    then removing the line with the user called "redis" along with any blank lines.