[GH-ISSUE #4577] raspberry pi 32bit userland - /usr/local/bin/ollama: cannot execute: required file not found #2872

Open
opened 2026-04-12 13:13:23 -05:00 by GiteaMirror · 16 comments
Owner

Originally created by @eliklein02 on GitHub (May 22, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4577

Originally assigned to: @dhiltgen on GitHub.

What is the issue?

I'm trying to install ollama on a raspberry pi, I get that it'll be slow but I'm just playing around.

So running the curl command worked and it downloaded.

But when I run ollama run gemma or ollama pull gemma l get -bash: /usr/local/bin/ollama: cannot execute: required file not found

OS

Linux

GPU

Other

CPU

Other

Ollama version

No response

Originally created by @eliklein02 on GitHub (May 22, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4577 Originally assigned to: @dhiltgen on GitHub. ### What is the issue? I'm trying to install ollama on a raspberry pi, I get that it'll be slow but I'm just playing around. So running the curl command worked and it downloaded. But when I run ollama run gemma or ollama pull gemma l get `-bash: /usr/local/bin/ollama: cannot execute: required file not found` ### OS Linux ### GPU Other ### CPU Other ### Ollama version _No response_
GiteaMirror added the linuxbug labels 2026-04-12 13:13:23 -05:00
Author
Owner

@dhiltgen commented on GitHub (May 22, 2024):

Can you share more details about your setup?

  • What Pi are you running? cat /sys/firmware/devicetree/base/model
  • What distro are you using?
  • What does ldd /usr/local/bin/ollama report? (in particular, are there any missing libraries?)
  • If the server started (I think it didn't but maybe it did) can you share your server log? https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md
<!-- gh-comment-id:2125638952 --> @dhiltgen commented on GitHub (May 22, 2024): Can you share more details about your setup? - What Pi are you running? `cat /sys/firmware/devicetree/base/model` - What distro are you using? - What does `ldd /usr/local/bin/ollama` report? (in particular, are there any missing libraries?) - If the server started (I think it didn't but maybe it did) can you share your server log? https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md
Author
Owner

@JosephMilo commented on GitHub (May 22, 2024):

Fail Code
Hi I have the same issue. It looks as though ollama does not exist after the one line installation command is ran. I'm running a version of Raspbian (FullPageOS) on a Pi 5. Any help would be appreciated!

<!-- gh-comment-id:2125957128 --> @JosephMilo commented on GitHub (May 22, 2024): ![Fail Code](https://github.com/ollama/ollama/assets/99932682/cdc879b8-fdea-424e-b5bc-2afe58c172f1) Hi I have the same issue. It looks as though ollama does not exist after the one line installation command is ran. I'm running a version of Raspbian (FullPageOS) on a Pi 5. Any help would be appreciated!
Author
Owner

@dhiltgen commented on GitHub (May 23, 2024):

Can you share the output of the install script? It should say something like

...
Installing ollama to /usr/local/bin
...

The error seems to indicate the install command didn't work for some reason. Perhaps /usr/local/bin is on a read-only filesystem?

<!-- gh-comment-id:2127526951 --> @dhiltgen commented on GitHub (May 23, 2024): Can you share the output of the install script? It should say something like ``` ... Installing ollama to /usr/local/bin ... ``` The error seems to indicate the install command didn't work for some reason. Perhaps `/usr/local/bin` is on a read-only filesystem?
Author
Owner

@JosephMilo commented on GitHub (May 27, 2024):

Install_output
This was the output of the install. It's odd the installer didn't throw any errors

<!-- gh-comment-id:2132508297 --> @JosephMilo commented on GitHub (May 27, 2024): ![Install_output](https://github.com/ollama/ollama/assets/99932682/1579b879-8a2c-4b6d-9bd1-41c77244dde9) This was the output of the install. It's odd the installer didn't throw any errors
Author
Owner

@dhiltgen commented on GitHub (May 28, 2024):

Can you run the following and share the results?

ls -l /usr/local/bin/ollama
ldd /usr/local/bin/ollama
<!-- gh-comment-id:2135723500 --> @dhiltgen commented on GitHub (May 28, 2024): Can you run the following and share the results? ``` ls -l /usr/local/bin/ollama ldd /usr/local/bin/ollama ```
Author
Owner

@eliklein02 commented on GitHub (May 28, 2024):

-rwxr-xr-x 1 root root 292706744 May 22 11:53 /usr/local/bin/ollama
For the first one.
For the second it is: not a dynamic executable

<!-- gh-comment-id:2135747177 --> @eliklein02 commented on GitHub (May 28, 2024): `-rwxr-xr-x 1 root root 292706744 May 22 11:53 /usr/local/bin/ollama ` For the first one. For the second it is: not a dynamic executable
Author
Owner

@dhiltgen commented on GitHub (May 28, 2024):

Hmm... I don't have a Raspberry Pi to test on, but on another ARM system, here's what I see

% ldd /usr/local/bin/ollama
	linux-vdso.so.1 (0x0000ffffb5a47000)
	libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000ffffb59cf000)
	libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffffb599e000)
	libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffffb57b9000)
	librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000ffffb57a1000)
	libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffffb578d000)
	libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffffb56e2000)
	libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffffb56be000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffb554b000)
	/lib/ld-linux-aarch64.so.1 (0x0000ffffb5a17000)
% file /usr/local/bin/ollama
/usr/local/bin/ollama: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=8e07dd436a498424b3a1bf3444718bad08de0a11, for GNU/Linux 3.7.0, stripped
<!-- gh-comment-id:2135794112 --> @dhiltgen commented on GitHub (May 28, 2024): Hmm... I don't have a Raspberry Pi to test on, but on another ARM system, here's what I see ``` % ldd /usr/local/bin/ollama linux-vdso.so.1 (0x0000ffffb5a47000) libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000ffffb59cf000) libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffffb599e000) libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffffb57b9000) librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000ffffb57a1000) libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffffb578d000) libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffffb56e2000) libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffffb56be000) libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffb554b000) /lib/ld-linux-aarch64.so.1 (0x0000ffffb5a17000) % file /usr/local/bin/ollama /usr/local/bin/ollama: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=8e07dd436a498424b3a1bf3444718bad08de0a11, for GNU/Linux 3.7.0, stripped ```
Author
Owner

@wyuzh commented on GitHub (May 29, 2024):

same situation on the raspberry pi

<!-- gh-comment-id:2136880726 --> @wyuzh commented on GitHub (May 29, 2024): same situation on the raspberry pi
Author
Owner

@crystoll commented on GitHub (Jun 2, 2024):

Identical issue on raspberry pi 4, haven't got it working yet. Also getting: It's not a dynamic executable. arch is aarch64 on my device+os.

<!-- gh-comment-id:2143786684 --> @crystoll commented on GitHub (Jun 2, 2024): Identical issue on raspberry pi 4, haven't got it working yet. Also getting: It's not a dynamic executable. arch is aarch64 on my device+os.
Author
Owner

@lingster commented on GitHub (Jun 4, 2024):

FYI, have you tried building ollama from source on your raspberry pi 4?

<!-- gh-comment-id:2148464651 --> @lingster commented on GitHub (Jun 4, 2024): FYI, have you tried building ollama from source on your raspberry pi 4?
Author
Owner

@crystoll commented on GitHub (Jun 5, 2024):

Tried it, running into problems with golang version numbering change so cannot get through that. (1.22 vs 1.22.0)

Anyways, here's the best lead for the source of problem I can get. Binary links interpreter location that does not exist, that's why we get the file not found error. I do not know the root cause of that, and why it seems to (or used to) work on some raspi 64bit installations.

So here's my test case:

curl -L https://ollama.com/download/ollama-linux-arm64 -o ./ollama chmod +x ollama ./ollama
This gives me:
-bash: ./ollama: No such file or directory

ldd ollama
This gives me: not a dynamic executable

file ollama

This gives me:
ollama: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=42437893c118be9f51eb66121bf6bdf039b20de5, for GNU/Linux 3.7.0, stripped

arch ls /lib/ld-linux-aarch64.so.1

These give me:
aarch64
ls: cannot access '/lib/ld-linux-aarch64.so.1': No such file or directory

So perhaps a prerequisite we are missing?

Edit: Ahha! And I start to see where the problem might be. I suspect my installation has a weird mix of 64-bit kernel with 32-bit userland, based on the results of

dpkg-architecture --list

so this might be the case with others, too. As for how to fix this or work around this, no idea.

<!-- gh-comment-id:2148915026 --> @crystoll commented on GitHub (Jun 5, 2024): Tried it, running into problems with golang version numbering change so cannot get through that. (1.22 vs 1.22.0) Anyways, here's the best lead for the source of problem I can get. Binary links interpreter location that does not exist, that's why we get the file not found error. I do not know the root cause of that, and why it seems to (or used to) work on some raspi 64bit installations. So here's my test case: ` curl -L https://ollama.com/download/ollama-linux-arm64 -o ./ollama chmod +x ollama ./ollama ` This gives me: -bash: ./ollama: No such file or directory ` ldd ollama ` This gives me: not a dynamic executable ` file ollama ` This gives me: ollama: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=42437893c118be9f51eb66121bf6bdf039b20de5, for GNU/Linux 3.7.0, stripped ` arch ls /lib/ld-linux-aarch64.so.1 ` These give me: aarch64 ls: cannot access '/lib/ld-linux-aarch64.so.1': No such file or directory So perhaps a prerequisite we are missing? Edit: Ahha! And I start to see where the problem might be. I suspect my installation has a weird mix of 64-bit kernel with 32-bit userland, based on the results of ` dpkg-architecture --list ` so this might be the case with others, too. As for how to fix this or work around this, no idea.
Author
Owner

@crystoll commented on GitHub (Jun 5, 2024):

Okay, so got it to work. Not my current install, but by reinstalling latest and greatest raspi Bookworm with 64-bit kernel + 64-bit OS, then it worked right off the bat.

My original installation was Pi-Top customized version, turns out that was based on legacy Bullrush raspi, which combines 64-bit kernel with 32-bit OS.

So anyone in this thread having issues probably has a) intermediate version like Bullrush with mixed architecture or b) legacy installation where arch was updated to 64-bit but OS wasn't. I don't know how to fix that, but by installing the Bookworm with 64-bit OS Ollama starts working as it should.

<!-- gh-comment-id:2149724576 --> @crystoll commented on GitHub (Jun 5, 2024): Okay, so got it to work. Not my current install, but by reinstalling latest and greatest raspi Bookworm with 64-bit kernel + 64-bit OS, then it worked right off the bat. My original installation was Pi-Top customized version, turns out that was based on legacy Bullrush raspi, which combines 64-bit kernel with 32-bit OS. So anyone in this thread having issues probably has a) intermediate version like Bullrush with mixed architecture or b) legacy installation where arch was updated to 64-bit but OS wasn't. I don't know how to fix that, but by installing the Bookworm with 64-bit OS Ollama starts working as it should.
Author
Owner

@dhiltgen commented on GitHub (Jun 5, 2024):

It sounds like what we should do is refine our install script to somehow detect this 32bit userspace setup and fail fast with a good error message. Does anyone have insight on the best way to detect the 32 vs. 64 bit userspace on raspberry pi? (from the sounds of it, uname -m is going to report 64 bit.)

<!-- gh-comment-id:2150433471 --> @dhiltgen commented on GitHub (Jun 5, 2024): It sounds like what we should do is refine our install script to somehow detect this 32bit userspace setup and fail fast with a good error message. Does anyone have insight on the best way to detect the 32 vs. 64 bit userspace on raspberry pi? (from the sounds of it, `uname -m` is going to report 64 bit.)
Author
Owner

@pwgit-create commented on GitHub (Jun 5, 2024):

It sounds like what we should do is refine our install script to somehow detect this 32bit userspace setup and fail fast with a good error message. Does anyone have insight on the best way to detect the 32 vs. 64 bit userspace on raspberry pi? (from the sounds of it, uname -m is going to report 64 bit.)

Either that or uname -p. Nevertheless, the uname command will cause anger among people. Create an alias or function for uname and try to hide it a bit.

<!-- gh-comment-id:2150563167 --> @pwgit-create commented on GitHub (Jun 5, 2024): > It sounds like what we should do is refine our install script to somehow detect this 32bit userspace setup and fail fast with a good error message. Does anyone have insight on the best way to detect the 32 vs. 64 bit userspace on raspberry pi? (from the sounds of it, `uname -m` is going to report 64 bit.) Either that or uname -p. Nevertheless, the uname command will cause anger among people. Create an alias or function for uname and try to hide it a bit.
Author
Owner

@eliklein02 commented on GitHub (Jun 7, 2024):

I'm pretty sure I'm running 64 and it's still not working.

uname—m gave me 'aarch64'

<!-- gh-comment-id:2154203086 --> @eliklein02 commented on GitHub (Jun 7, 2024): I'm pretty sure I'm running 64 and it's still not working. uname—m gave me 'aarch64'
Author
Owner

@crystoll commented on GitHub (Jun 7, 2024):

To clarify, both arch and uname give aarch64.
I found out the problem by this command, that lists 32-bit architectures:

dpkg-architecture --list

<!-- gh-comment-id:2154216867 --> @crystoll commented on GitHub (Jun 7, 2024): To clarify, both arch and uname give aarch64. I found out the problem by this command, that lists 32-bit architectures: dpkg-architecture --list
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2872