Last active
July 8, 2025 09:34
-
-
Save UbuntuEvangelist/afd13e6fba7ffc5dbf7c5da31b55dff6 to your computer and use it in GitHub Desktop.
Install CMake 3.22 Ubuntu 22.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install build-essential | |
sudo apt install libssl-dev | |
export OPENSSL_ROOT_DIR=/usr/include/openssl | |
wget https://cmake.org/files/v3.29/cmake-3.29.2.tar.gz | |
tar -xzvf cmake-3.29.2.tar.gz | |
cd cmake-3.29.2 | |
./bootstrap | |
make -j$(nproc) | |
sudo make install | |
# Update PATH Environment Variable | |
which cmake | |
/usr/local/bin/cmake | |
export PATH=/usr/local/bin/cmake:$PATH | |
source ~/.bashrc | |
cmake --version |
Thanks for sharing.
In my case I needed to be more explicit as it couldn't find ssl libs.
./bootstrap -- -DCMAKE_USE_OPENSSL=ON \ -DOPENSSL_ROOT_DIR=/usr \ -DOPENSSL_INCLUDE_DIR=/usr/include \ -DOPENSSL_CRYPTO_LIBRARY=/usr/lib/x86_64-linux-gnu/libcrypto.so \ -DOPENSSL_SSL_LIBRARY=/usr/lib/x86_64-linux-gnu/libssl.so
Thanks, it really works.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for sharing.
In my case I needed to be more explicit as it couldn't find ssl libs.