The following error occurs when you install redis in Ubuntu18 version, a reference to the work order. Successfully resolved, record it.
Direct installation using the command will appear the following screenshot error.
ubuntu@VM-0-16-ubuntu:~$ sudo apt-get install redis-server
The reason for this error is Ubuntu18 latest Redis configuration requires host support IPV6 , it is possible from the following 2 to resolve this problem methods.
(1) Turn on the host of IPV6 settings
- Modify the kernel configuration file
ubuntu@VM-0-16-ubuntu:~$ sudo vim /etc/sysctl.conf
- To make the modified configuration file to take effect
ubuntu@VM-0-16-ubuntu:~$ sudo sysctl -p
- Reinstall Redis
ubuntu@VM-0-16-ubuntu:~$ sudo apt-get install redis-server
Description:
After modifying the kernel configuration file does not need to restart the network card ( Ubuntu VM-0-16 @-Ubuntu: ~ $ sudo netplan the Apply ) with ubuntu @ VM-0-16-ubuntu: ~ $ sudo sysctl -p command to load the latest kernel profiles on the line.
(2) cancel Redis configuration file IPV6 listening
- Modify Redis configuration file
ubuntu@VM-0-16-ubuntu:~$ sudo vim /etc/redis/redis.conf
- Reinstall (first 1 times will be reported the same mistake, the first 2 times will be successful)
ubuntu@VM-0-16-ubuntu:~$ sudo apt-get install redis-server