Install Redis
server system as centos7 on a cloud server, directly look up the address of Redis official website, wget, tar, execute mark command, find error report
serverLog(LL_NOTICE,"The server is now ready to accept connections at %s", server.unixsocket);
^
server.c:5103:19: error: ‘struct redisServer’ has no member named ‘supervised_mode’
if (server.supervised_mode == SUPERVISED_SYSTEMD) {
^
server.c:5104:24: error: ‘struct redisServer’ has no member named ‘masterhost’
if (!server.masterhost) {
^
server.c:5117:15: error: ‘struct redisServer’ has no member named ‘maxmemory’
if (server.maxmemory > 0 && server.maxmemory < 1024*1024) {
^
server.c:5117:39: error: ‘struct redisServer’ has no member named ‘maxmemory’
if (server.maxmemory > 0 && server.maxmemory < 1024*1024) {
^
server.c:5118:176: error: ‘struct redisServer’ has no member named ‘maxmemory’
serverLog(LL_WARNING,"WARNING: You specified a maxmemory value that is less than 1MB (current value is %llu bytes). Are you sure this is what you really want?", server.maxmemory);
^
server.c: In function ‘hasActiveChildProcess’:
server.c:1476:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
server.c: In function ‘allPersistenceDisabled’:
server.c:1482:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
server.c: In function ‘writeCommandsDeniedByDiskError’:
server.c:3747:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
server.c: In function ‘iAmMaster’:
server.c:4914:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[1]: *** [server.o] Error 1
make[1]: Leaving directory `/usr/src/redis-6.0.1/src'
make: *** [install] Error 2
GCC and other environments have been installed, and the ways of recompiling after clearing compilation information and deleting decompressed files and redecompressing compilation have been tried without improvement. Later, it was found that it was related to the version of GCC
//Check gcc Version
gcc -v
Centos7 default version for 4.8.5
and redis6.0 + need GCC version 5.3 and above, so upgrade GCC can be
//Upgrade gcc to V9 or high
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
You also need to execute the command
//change the current gcc version to 9
scl enable devtoolset-9 bash
//or change permanetly
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
Read More:
- Problems and causes of Java’s main function format (public static void main (string args()))
- The number of control threads and concurrency number of concurrent executor of Java starting gun
- How to Close the Current Form in JAVA Swing
- IDEA-Error java error release version 5 not supported (How To Fix)
- The principle and return value of get() function in C language
- Abstract method and static method of java interface
- Explicit and implicit conversion of Java data type
- Android startup page (solve the problem of starting black and white screen)
- Mybatis single parameter pass in exception (How to Fix)
- JAVE: LeetCode(189) Rotate Array
- Extracting JDBC tool class: JDBC utils
- Eclipse relies on spring boot configuration processor, and there is no prompt for writing properties and YML
- Multipartfiletofileutils (multipartfile to file)
- Resolve warning: could’t clear Tomcat cache java.lang.NoSuchFieldException: resourceEntries
- How to Fix COM Surrogate has stopped working in Windows 7
- C++ String case conversion and transform, tower, upper, usage
- Configuration of springboot + Druid connection pool
- [Errno 14] PYCURL ERROR 7 – “couldn’t connect to host”
- Xdoc generates API documents based on Java annotations
- Ternary operator in Java?: error: not a statement