ubuntu error : Errors were encountered while processing: redis-server

5,826

You should probably alter the redis.conf file to force it to use IPv4 if it supports that mode only and then maybe you could run it without IPv6.

nano /etc/redis/redis.conf

Simply remove the ::1 IPv6 loopback address from the bind config option:

- bind 127.0.0.1 ::1
+ bind 127.0.0.1

Now redis will not try to use the IPv6 network.

Try to install again

apt install redis-server

Test the Redis Instance Functionality To test that your service is functioning correctly, connect to the Redis server with the command-line client:

redis-cli

In the prompt that follows, test connectivity by typing:

ping You should see:

$ 127.0.0.1:6379> ping

Output

PONG

Check that you can set keys by typing:

$ 127.0.0.1:6379> set test "It's working!"

Output

OK

Now, retrieve the value by typing:

$ 127.0.0.1:6379> get test

You should be able to retrieve the value we stored:

Output

$ 127.0.0.1:6379> "It's working!"

Exit the Redis prompt to get back to the shell:

127.0.0.1:6379> exit

As a final test, let's restart the Redis instance:

$ sudo systemctl restart redis
Share:
5,826

Related videos on Youtube

Behnam Rasouli
Author by

Behnam Rasouli

Updated on September 18, 2022

Comments

  • Behnam Rasouli
    Behnam Rasouli about 1 year

    I am getting error when I run sudo apt-get upgrade

    output error :

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] Y
    Setting up redis-server (5:4.0.9-1) ...
    dpkg-statoverride: error: user 'redis' does not exist
    dpkg: error processing package redis-server (--configure):
     installed redis-server package post-installation script subprocess returned error exit status 2
    
    Errors were encountered while processing:
     redis-server
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    the error about redis-server and can not remove redis-server.

    my linux is ubuntu 18 Desktop.

  • Eric
    Eric almost 4 years
    Saved my ass !!!
  • Marcelo
    Marcelo over 3 years
    And mine too...