From e1b00854a5d09af924a64683022188fde78920c3 Mon Sep 17 00:00:00 2001 From: LFdev <146497073+LFd3v@users.noreply.github.com> Date: Sun, 3 May 2026 17:43:18 -0300 Subject: [PATCH] Fix check for libcurl hearders in install.sh (#5251) * Fix check for libcurl hearders in install.sh Checking for `dpkg` has no relation to libcurl headers at all. If the package is installed, then an executable `curl-config` is available in Ubuntu/Debian as it can be seen here: https://ubuntu.pkgs.org/26.04/ubuntu-main-amd64/libcurl4-openssl-dev_8.18.0-1ubuntu2_amd64.deb.html This also fix the installation in ArchLinux, provided the needed packages are installed previously as shown in the error message when a package is missing. * Fix check for libcurl hearders in studio/setup.sh Use the same check as install.sh. --------- Co-authored-by: Roland Tannous <115670425+rolandtannous@users.noreply.github.com> --- install.sh | 4 +--- studio/setup.sh | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index a9861a108f..4f17ea80cb 100755 --- a/install.sh +++ b/install.sh @@ -974,9 +974,7 @@ case "$OS" in fi command -v gcc >/dev/null 2>&1 || MISSING="$MISSING build-essential" # libcurl dev headers for llama.cpp HTTPS support - if command -v dpkg >/dev/null 2>&1; then - dpkg -s libcurl4-openssl-dev >/dev/null 2>&1 || MISSING="$MISSING libcurl4-openssl-dev" - fi + command -v curl-config >/dev/null 2>&1 || MISSING="$MISSING libcurl4-openssl-dev" ;; esac diff --git a/studio/setup.sh b/studio/setup.sh index 9575f143d5..39fb566f1b 100755 --- a/studio/setup.sh +++ b/studio/setup.sh @@ -699,7 +699,7 @@ if [ "$_NEED_LLAMA_SOURCE_BUILD" = true ] && grep -qi microsoft /proc/version 2> case "$_pkg" in build-essential) command -v gcc >/dev/null 2>&1 || _STILL_MISSING="$_STILL_MISSING $_pkg" ;; pciutils) command -v lspci >/dev/null 2>&1 || _STILL_MISSING="$_STILL_MISSING $_pkg" ;; - libcurl4-openssl-dev) dpkg -s "$_pkg" >/dev/null 2>&1 || _STILL_MISSING="$_STILL_MISSING $_pkg" ;; + libcurl4-openssl-dev) command -v curl-config >/dev/null 2>&1 || _STILL_MISSING="$_STILL_MISSING $_pkg" ;; *) command -v "$_pkg" >/dev/null 2>&1 || _STILL_MISSING="$_STILL_MISSING $_pkg" ;; esac done