Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

Install CMake 3.30.8 on Ubuntu 22.04

How to Install CMake 3.30.8 on Ubuntu 22.04

CMake is a powerful open-source tool for managing the build process of software projects. This guide provides a step-by-step process to install CMake version 3.30.8 on Ubuntu 22.04 (Jammy Jellyfish) using the Kitware APT repository. Whether you're a developer or setting up a build environment, follow these steps to get CMake 3.30.8 up and running.

Prerequisites

Before starting, ensure you have:

  • An Ubuntu 22.04 system with internet access.
  • Administrative privileges (sudo access).

Step-by-Step Installation

  1. Update System Packages

    Keep your system up to date to avoid compatibility issues.

    sudo apt update
    sudo apt upgrade -y
  2. Install Required Tools

    Install packages needed to manage the Kitware repository.

    sudo apt install -y apt-transport-https ca-certificates gnupg software-properties-common wget
  3. Add Kitware APT Repository

    Import the Kitware signing key and add the repository for Ubuntu 22.04 (jammy).

    wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
    echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
  4. Update Package Index

    Refresh the package lists to include the Kitware repository.

    sudo apt update
  5. Remove Existing CMake Versions

    Purge any previously installed CMake versions to prevent conflicts.

    sudo apt purge --auto-remove cmake cmake-data
  6. Clean APT Cache

    Clear cached packages to ensure a clean installation.

    sudo apt clean
  7. Install CMake 3.30.8

    You can also check other available cmake versions using apt-cache madison cmake

    Install CMake 3.30.8 and its data package explicitly to avoid dependency issues.

    sudo apt install -y cmake=3.30.8-0kitware1ubuntu22.04.1 cmake-data=3.30.8-0kitware1ubuntu22.04.1
  8. Verify Installation

    Confirm that CMake 3.30.8 is installed correctly.

    cmake --version

    Expected output:

    cmake version 3.30.8

Troubleshooting Tips

If you encounter issues, try these steps:

  • Dependency Conflicts: Run sudo apt install -f to fix broken dependencies.
  • Held Packages: Check for held packages with sudo apt-mark showhold and release them with sudo apt-mark unhold cmake cmake-data.
  • Verify Binary Path: Ensure the correct CMake is used with which cmake (should point to /usr/bin/cmake).

Preventing Automatic Upgrades

To prevent APT from upgrading CMake to a newer version, hold the package:

sudo apt-mark hold cmake cmake-data

To unhold later:

sudo apt-mark unhold cmake cmake-data

Conclusion

You’ve successfully installed CMake 3.30.8 on Ubuntu 22.04! This version is ideal for projects requiring specific CMake features or compatibility. For more details, visit the Kitware APT repository or CMake’s official website.

Happy building!

Linux HTOP settings/configuration

vi ~/.config/htop/htoprc 

Update with the following:
 
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=-1
tree_sort_key=0
tree_sort_direction=1
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
tree_view=0
tree_view_always_by_pid=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=0
degree_fahrenheit=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
left_meters=LeftCPUs8 Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs8 Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2
hide_function_bar=0

Following will be the view:


Install CMake 3.30.8 on Ubuntu 22.04

How to Install CMake 3.30.8 on Ubuntu 22.04 CMake is a powerful open-source tool for managing the build process of software proje...