Install redis-7.0.7 from the source. When you execute make, you will be prompted with the following suggestions

/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(jemalloc.o): relocation R_X86_64_32 against symbol `je_extents_rtree' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(arena.o): relocation R_X86_64_32S against symbol `je_h_steps' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(background_thread.o): relocation R_X86_64_32S against symbol `je_h_steps' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(base.o): relocation R_X86_64_32S against symbol `je_sz_size2index_tab' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(bin.o): relocation R_X86_64_32 against symbol `je_bin_infos' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(ctl.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(extent.o): relocation R_X86_64_32 against symbol `je_extents_rtree' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(hook.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(large.o): relocation R_X86_64_32S against symbol `je_arenas' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(log.o): relocation R_X86_64_32 against symbol `je_log_var_names' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(malloc_io.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(mutex.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(pages.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(prof.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(rtree.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(stats.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(sz.o): relocation R_X86_64_32S against symbol `je_sz_pind2sz_tab' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(tcache.o): relocation R_X86_64_32S against symbol `je_sz_index2size_tab' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(tsd.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(witness.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(ckh.o): relocation R_X86_64_32S against symbol `je_sz_size2index_tab' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: ../deps/jemalloc/lib/libjemalloc.a(nstime.o): warning: relocation in read-only section `.rodata'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:374: redis-server] Error 1


Comment From: liang-hiwin

root@debian:~/redis-7.0.7# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/12.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.1.0 (GCC)

Comment From: bugwz

@liang-hiwin Please show your changes.

Comment From: liang-hiwin

@liang-hiwin Please show your changes.

I didn't modify anything

Comment From: windssind

Hello.I have encountered the same problem as yours.Could you please tell me how you solve the problem?