[GH-ISSUE #7735] docker build error #4938

Closed
opened 2026-04-12 16:00:03 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @zimmortal on GitHub (Nov 19, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7735

What is the issue?

ERROR: failed to solve: process "/bin/sh -c CMAKE_VERSION=${CMAKE_VERSION} GOLANG_VERSION=${GOLANG_VERSION} sh /rh_linux_deps.sh" did not complete successfully: exit code: 2

1289.9 
1289.9 Complete!
1290.2 + '[' x86_64 = x86_64 ']'
1290.2 + curl -s -L https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz
1290.2 + tar -Jx -C /tmp --strip-components 1
2477.3 xz: (stdin): Unexpected end of input
2477.3 tar: Unexpected EOF in archive
2477.3 tar: Unexpected EOF in archive
2477.3 tar: Error is not recoverable: exiting now
2477.3 + '[' -n 3.22.1 ']'
2477.3 + tar -zx -C /usr --strip-components 1
2477.3 ++ uname -m
2477.3 + curl -s -L https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.tar.gz
3509.3 
3509.3 gzip: stdin: unexpected end of file
3509.3 tar: Unexpected EOF in archive
3509.3 tar: Unexpected EOF in archive
3509.3 tar: Error is not recoverable: exiting now
------

Then I tried to modify the code

 if [ "${MACHINE}" = "x86_64" ] ; then
-    curl -s -L https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz | tar -Jx -C /tmp --strip-components 1 && \
+    curl -s -L -o /tmp/ccache-4.10.2-linux-x86_64.tar.xz https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz && \
+    tar -xf /tmp/ccache-4.10.2-linux-x86_64.tar.xz -C /tmp --strip-components=1 && \
     mv /tmp/ccache /usr/local/bin/
 else
     yum -y install epel-release

Delete the parameter -J to make it effective

OS

macOS

GPU

No response

CPU

Apple

Ollama version

,0.3.13

Originally created by @zimmortal on GitHub (Nov 19, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7735 ### What is the issue? ERROR: failed to solve: process "/bin/sh -c CMAKE_VERSION=${CMAKE_VERSION} GOLANG_VERSION=${GOLANG_VERSION} sh /rh_linux_deps.sh" did not complete successfully: exit code: 2 ``` 1289.9 1289.9 Complete! 1290.2 + '[' x86_64 = x86_64 ']' 1290.2 + curl -s -L https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz 1290.2 + tar -Jx -C /tmp --strip-components 1 2477.3 xz: (stdin): Unexpected end of input 2477.3 tar: Unexpected EOF in archive 2477.3 tar: Unexpected EOF in archive 2477.3 tar: Error is not recoverable: exiting now 2477.3 + '[' -n 3.22.1 ']' 2477.3 + tar -zx -C /usr --strip-components 1 2477.3 ++ uname -m 2477.3 + curl -s -L https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.tar.gz 3509.3 3509.3 gzip: stdin: unexpected end of file 3509.3 tar: Unexpected EOF in archive 3509.3 tar: Unexpected EOF in archive 3509.3 tar: Error is not recoverable: exiting now ------ ``` Then I tried to modify the code ``` if [ "${MACHINE}" = "x86_64" ] ; then - curl -s -L https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz | tar -Jx -C /tmp --strip-components 1 && \ + curl -s -L -o /tmp/ccache-4.10.2-linux-x86_64.tar.xz https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz && \ + tar -xf /tmp/ccache-4.10.2-linux-x86_64.tar.xz -C /tmp --strip-components=1 && \ mv /tmp/ccache /usr/local/bin/ else yum -y install epel-release ``` Delete the parameter -J to make it effective ### OS macOS ### GPU _No response_ ### CPU Apple ### Ollama version ,0.3.13
GiteaMirror added the bug label 2026-04-12 16:00:03 -05:00
Author
Owner

@Squishedmac commented on GitHub (Dec 20, 2024):

I faced the same issue on windows, it seems to be the LF to CLRF issue. Not clear what caused it but i suspect its git auto.clrf

<!-- gh-comment-id:2556607414 --> @Squishedmac commented on GitHub (Dec 20, 2024): I faced the same issue on windows, it seems to be the LF to CLRF issue. Not clear what caused it but i suspect its git auto.clrf
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4938