Saltar al contenido
56K

56K

Slow IT Notes – Just 4 Fun

Menú
Menú

ClamAV – Compilar la última versión en Debian 11

Publicada el 06/10/202206/02/2023 por fanta

Hace tiempo hice un post con los pasos para compilar la última versión de clamav sobre una Debian 10. El tema es que me puse hace unos meses a querer instalar sobre una Debian 11 una última versión de este maravilloso antivirus que es clamav y aquello ya no funcionaba igual.

Hice este script que tendría que permitir poder instalar del tirón la última versión de clamav sobre una Debian 11:

 

#!/bin/bash
gitRepo="https://github.com/Cisco-Talos/clamav"

function installDependencies {
  apt-get update -y && apt-get install -y gcc make pkg-config python3 python3-pip python3-pytest valgrind check libbz2-dev libcurl4-openssl-dev libjson-c-dev libmilter-dev libncurses5-dev libpcre2-dev libssl-dev libxml2-dev zlib1g-dev cargo rustc git cmake librust-flate2* curl
}

function getLastVersion() {
  git clone "$gitRepo" /var/tmp/clamav
  cd /var/tmp/clamav
  git fetch --all --tags
  lastClamavVersion=$(git describe | cut -d "-" -f 2)
  rm -rf /var/tmp/clamav
  cd /var/tmp/
  wget -q "https://www.clamav.net/downloads/production/clamav-$lastClamavVersion.tar.gz" -O /var/tmp/clamav-$lastClamavVersion.tar.gz
  tar xfvz /var/tmp/clamav-$lastClamavVersion.tar.gz
  cd /var/tmp/clamav-$lastClamavVersion
}

function compileLastVersion() {
  mkdir -p build
  cd build
  cmake .. -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_INSTALL_LIBDIR=lib -D APP_CONFIG_DIRECTORY=/etc/clamav -D DATABASE_DIRECTORY=/var/lib/clamav -D ENABLE_JSON_SHARED=OFF
  cmake --build .
  ctest
  cmake --build . --target install
}

function main() {
  installDependencies
  getLastVersion
  compileLastVersion
}

main

 

Seguramente a nadie le importará pero quería dejarlo por aquí antes de borrarlo de un repo git en el que lo tenía.

Saludos cordiales.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

fanta de naranja
💾 QEMU
💾 SOLARIS
💾 ESXi
💾 FREEBSD
💾 DEBIAN
💾 AMIGA
💾 SYSADMIN
💾 JUNOS
💾 IMPRIMIR
💾 MSDOS
💾 WINDOWS
💾 FAIRPHONE
💾 GAMING
💾 STREAMING
💾 REDHAT
💾 GRÁFICOS
💾 CACHARROS
💾 SONIDO
💾 NETWORKING
💾 ROCKY
💾 SUSE
💾 TMP
©2025 56K | Construido utilizando WordPress y Responsive Blogily tema por Superb