RHEL 9要求x86_64的CPU支持x86-64-v2,x86-64-v2需要处理器支持 CMPXCHG16B、LAHF-SAHF、POPCNT、SSE3、SSE4.1、SSE4.2、SSSE3 等现代指令集
检查CPU是否支持x86-64-v2的方法 #!/bin/shflags=$(cat /proc/cpuinfo | grep flags | head -n 1 | cut -d: -f2)supports_v2='awk "/cx16/&&/lahf/&&/popcnt/&&/sse4_1/&&/sse4_2/&&/ssse3/ {found=1} END {exit !found}"'echo "$flags" | eval $supports_v2 if [ $? -eq 0 ]; thenecho "CPU supports x86-64-v2"elseecho "CPU doesn't support x86-64-v2"fi 参考【1】https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/9.0_release_notes/architectures 【2】https://unix.stackexchange.com/questions/631217/how-do-i-check-if-my-cpu-supports-x86-64-v2