New CMake Version Does Not Take Effect After CMake Is Upgraded
Key Process and Cause Analysis
Another CMake version already exists in the environment and has a higher priority than the installed CMake version.
Conclusion and Solution
- Check for CMake in the environment.
find / -name cmake | grep bin
- View the CMake versions.
/usr/local/bin/cmake --version
/usr/local/cmake/bin/cmake --version
- Make the newly installed CMake version take effect.
cd /usr/local/bin/ mv cmake cmake-3.18.2 hash -r cmake --version
Parent topic: Troubleshooting