13. [original] version Ubuntu18 install redis error

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

  1. Modify the kernel configuration file

ubuntu@VM-0-16-ubuntu:~$ sudo vim /etc/sysctl.conf

 

  1. To make the modified configuration file to take effect

ubuntu@VM-0-16-ubuntu:~$ sudo sysctl -p

  1. 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

  1. Modify Redis configuration file

ubuntu@VM-0-16-ubuntu:~$ sudo vim /etc/redis/redis.conf

 

  1. 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

 

 

Guess you like

Origin www.cnblogs.com/Nick-Hu/p/11613964.html