Hashcat When running hashcat on Ubuntu 24.04, the error message "OpenCL or CUDA missing" appears.

AIhashcat

New member
Joined
Dec 13, 2025
Messages
1
Reaction score
0
Credits
12
When running hashcat on Ubuntu 24.04, the error message "OpenCL or CUDA missing" appears.

Is there a one-click script to install OpenCL and CUDA on both Intel and AMD CPUs?

One-click script installation of OpenCL CUDA on Intel CPU

One-click script installation of OpenCL CUDA on AMD CPU
 

A1131

Active member
Joined
Dec 30, 2019
Messages
1,511
Reaction score
2,465
Credits
4,792
The CUDA environment is only available on the NVIDIA platform. Here is the scrypt that autoinstall latest cuda

Code:
#!/bin/bash
# cuda_version_selector.sh - Choose and install specific CUDA version

echo "📋 Available CUDA versions for Ubuntu 22.04:"
echo "1. CUDA 12.4 (Latest)"
echo "2.CUDA 12.3"
echo "3.CUDA 12.2"
echo "4.CUDA 12.1"
echo "5.CUDA 12.0"
echo "6.CUDA 11.8 (Stable)"
echo "7.CUDA 11.7"
echo "8.CUDA 11.6"
echo "9.CUDA 11.5"
echo "10.CUDA 11.4"
echo "11. MIRACLES 11.3"
echo "12.CUDA 11.2"
echo "13.CUDA 11.1"
echo "14.CUDA 11.0"
echo "15. CUDA 10.2 (Legacy)"

read -p "Select CUDA version (1-15): " choice

case $choice in 
1) CUDA_VERSION="12.4" ;; 
2) CUDA_VERSION="12.3" ;; 
3) CUDA_VERSION="12.2" ;; 
4) CUDA_VERSION="12.1" ;; 
5) CUDA_VERSION="12.0" ;; 
6) CUDA_VERSION="11.8" ;; 
7) CUDA_VERSION="11.7" ;; 
8) CUDA_VERSION="11.6" ;; 
9) CUDA_VERSION="11.5" ;; 
10) CUDA_VERSION="11.4" ;; 
11) CUDA_VERSION="11.3" ;; 
12) CUDA_VERSION="11.2" ;; 
13) CUDA_VERSION="11.1" ;; 
14) CUDA_VERSION="11.0" ;; 
15) CUDA_VERSION="10.2" ;; 
*) echo "Invalid choice"; exit 1 ;;
esac

echo "📦 Installing CUDA ${CUDA_VERSION}..."

# Install based on version
if [[ "$CUDA_VERSION" == 12.* ]]; then 
VERSION_SHORT=$(echo $CUDA_VERSION | sed 's/\./-/') 
sudo apt install -y cuda-toolkit-${VERSION_SHORT}
elif [[ "$CUDA_VERSION" == 11.* ]]; then 
VERSION_SHORT=$(echo $CUDA_VERSION | cut -d. -f1-2 | sed 's/\./-/') 
sudo apt install -y cuda-toolkit-${VERSION_SHORT}
elif [[ "$CUDA_VERSION" == 10.* ]]; then 
VERSION_SHORT=$(echo $CUDA_VERSION | cut -d. -f1-2 | sed 's/\./-/') 
sudo apt install -y cuda-${VERSION_SHORT}
fi

echo "✅ CUDA ${CUDA_VERSION} installed!"
 

A1131

Active member
Joined
Dec 30, 2019
Messages
1,511
Reaction score
2,465
Credits
4,792
Sorry the script I attached will work for ubuntu 22.04 below are steps to get it working on 24.04

Code:
# 1. Add the correct repository for Ubuntu 24.04 and the desired CUDA version
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin
sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600
# Note the "ubuntu2404" and version "12-8" in the URL
wget https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda-repo-ubuntu2404-12-8-local_12.8.0-570.86.10-1_amd64.deb

# 2. Install the repository package
sudo dpkg -i cuda-repo-ubuntu2404-12-8-local_12.8.0-570.86.10-1_amd64.deb

# 3. Copy the keyring
sudo cp /var/cuda-repo-ubuntu2404-12-8-local/cuda-*-keyring.gpg /usr/share/keyrings/

# 4. Update and install the toolkit
sudo apt update
sudo apt install cuda-12-8
 
Top