Cannot install redis server

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

I end up removing redis which installed from apt-get and install the latest stable version from redis website manually. It works fine now... And I use this guide: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04

Tags:

Redis

Apt