ollama - 💡(How to fix) Fix compiling ollama in debian 12. seems to try to run yum from redhat using build_linux.sh [6 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15151Fetched 2026-04-08 01:52:58
View on GitHub
Comments
6
Participants
2
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
commented ×6labeled ×1

Error Message

=> ERROR [linux/arm64 base-arm64 2/2] RUN yum install -y yum-utils epel-release && dnf install -y clang ccache git && yum-config-manager --add-repo https://develop 4.4s => CANCELED [linux/arm64 jetpack-6 2/5] RUN apt-get update && apt-get install -y curl ccache unzip && curl -fsSL https://github.com/Kitware/CMake/releases/download/v3. 0.0s => CANCELED [linux/arm64 jetpack-5 2/5] RUN apt-get update && apt-get install -y curl ccache unzip && curl -fsSL https://github.com/Kitware/CMake/releases/download/v3. 0.0s => CANCELED [linux/amd64 base-amd64 2/2] RUN dnf install -y yum-utils ccache gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-binutils && yum-config-manager -- 0.0s

[linux/arm64 base-arm64 2/2] RUN yum install -y yum-utils epel-release && dnf install -y clang ccache git && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo: 4.249 exec /bin/sh: exec format error


2 warnings found (use docker --debug to expand):

  • FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/arm64" (line 95)
  • FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/arm64" (line 111) Dockerfile:24

23 | # install epel-release for ccache 24 | >>> RUN yum install -y yum-utils epel-release
25 | >>> && dnf install -y clang ccache git
26 | >>> && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo 27 | ENV CC=clang CXX=clang++

ERROR: failed to build: failed to solve: process "/bin/sh -c yum install -y yum-utils epel-release && dnf install -y clang ccache git && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo" did not complete successfully: exit code: 255

Code Example

=> ERROR [linux/arm64 base-arm64 2/2] RUN yum install -y yum-utils epel-release     && dnf install -y clang ccache git     && yum-config-manager --add-repo https://develop  4.4s
 => CANCELED [linux/arm64 jetpack-6 2/5] RUN apt-get update && apt-get install -y curl ccache unzip     && curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.  0.0s
 => CANCELED [linux/arm64 jetpack-5 2/5] RUN apt-get update && apt-get install -y curl ccache unzip     && curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.  0.0s
 => CANCELED [linux/amd64 base-amd64 2/2] RUN dnf install -y yum-utils ccache gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-binutils     && yum-config-manager --  0.0s
------
 > [linux/arm64 base-arm64 2/2] RUN yum install -y yum-utils epel-release     && dnf install -y clang ccache git     && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo:
4.249 exec /bin/sh: exec format error
------

 2 warnings found (use docker --debug to expand):
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/arm64" (line 95)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/arm64" (line 111)
Dockerfile:24
--------------------
  23 |     # install epel-release for ccache
  24 | >>> RUN yum install -y yum-utils epel-release \
  25 | >>>     && dnf install -y clang ccache git \
  26 | >>>     && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo
  27 |     ENV CC=clang CXX=clang++
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c yum install -y yum-utils epel-release     && dnf install -y clang ccache git     && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo" did not complete successfully: exit code: 255

---
RAW_BUFFERClick to expand / collapse

What is the issue?

i am trying to compile from source to use my m60 gpu. it is really hard? any sugestions

 => ERROR [linux/arm64 base-arm64 2/2] RUN yum install -y yum-utils epel-release     && dnf install -y clang ccache git     && yum-config-manager --add-repo https://develop  4.4s
 => CANCELED [linux/arm64 jetpack-6 2/5] RUN apt-get update && apt-get install -y curl ccache unzip     && curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.  0.0s
 => CANCELED [linux/arm64 jetpack-5 2/5] RUN apt-get update && apt-get install -y curl ccache unzip     && curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.  0.0s
 => CANCELED [linux/amd64 base-amd64 2/2] RUN dnf install -y yum-utils ccache gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-binutils     && yum-config-manager --  0.0s
------
 > [linux/arm64 base-arm64 2/2] RUN yum install -y yum-utils epel-release     && dnf install -y clang ccache git     && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo:
4.249 exec /bin/sh: exec format error
------

 2 warnings found (use docker --debug to expand):
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/arm64" (line 95)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/arm64" (line 111)
Dockerfile:24
--------------------
  23 |     # install epel-release for ccache
  24 | >>> RUN yum install -y yum-utils epel-release \
  25 | >>>     && dnf install -y clang ccache git \
  26 | >>>     && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo
  27 |     ENV CC=clang CXX=clang++
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c yum install -y yum-utils epel-release     && dnf install -y clang ccache git     && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/sbsa/cuda-rhel8.repo" did not complete successfully: exit code: 255

Relevant log output

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

extent analysis

Fix Plan

The fix involves modifying the Dockerfile to correctly install dependencies for the target architecture.

  • Update the base image to match the target architecture.
  • Install necessary dependencies using the correct package manager for the base image.
  • Configure the repository for CUDA installation.

Here are the steps:

  1. Update the base image: Change the FROM instruction to use an image that matches the target architecture. For example, use nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 for Ubuntu-based images.
  2. Install dependencies: Update the RUN instruction to install dependencies using apt-get for Ubuntu-based images or dnf/yum for RHEL-based images.
  3. Configure CUDA repository: Update the yum-config-manager instruction to use the correct repository URL for the target architecture.

Example code snippet:

# Use an Ubuntu-based image for arm64 architecture
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04

# Install dependencies using apt-get
RUN apt-get update && apt-get install -y curl ccache unzip

# Configure CUDA repository
RUN curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin | tee /etc/apt/preferences.d/cuda-repository-pin-600
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
RUN apt-get update && apt-get install -y cuda

Note: The above example is for Ubuntu-based images. For RHEL-based images, use dnf/yum instead of apt-get.

Verification

To verify the fix, rebuild the Docker image and check if the dependencies are installed correctly. You can do this by running the following command:

docker build -t my-image .

Then, run a container from the image and check if the dependencies are installed:

docker run -it my-image /bin/bash

Inside the container, you can check if the dependencies are installed by running commands like clang --version or nvcc --version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING