[GH-ISSUE #6227] ollama cannot start on ubuntu 22.04 #3892

Closed
opened 2026-04-12 14:43:50 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @garyyang85 on GitHub (Aug 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6227

What is the issue?

First time to run ollama, follow the guide:
https://github.com/ollama/ollama/blob/main/docs/linux.md#manual-install

service cannot start, logs:

journalctl -u ollama --no-pager
Aug 07 15:35:48 i-2y1kobn5 systemd[1]: Started Ollama Service.
Aug 07 15:35:48 i-2y1kobn5 systemd[1]: ollama.service: Main process exited, code=dumped, status=11/SEGV
Aug 07 15:35:48 i-2y1kobn5 systemd[1]: ollama.service: Failed with result 'core-dump'.
Aug 07 15:35:51 i-2y1kobn5 systemd[1]: ollama.service: Scheduled restart job, restart counter is at 1.
Aug 07 15:35:51 i-2y1kobn5 systemd[1]: Stopped Ollama Service.
Aug 07 15:35:51 i-2y1kobn5 systemd[1]: Started Ollama Service.
Aug 07 15:35:51 i-2y1kobn5 systemd[1]: ollama.service: Main process exited, code=dumped, status=11/SEGV
Aug 07 15:35:51 i-2y1kobn5 systemd[1]: ollama.service: Failed with result 'core-dump'.
Aug 07 15:35:54 i-2y1kobn5 systemd[1]: ollama.service: Scheduled restart job, restart counter is at 2.
Aug 07 15:35:54 i-2y1kobn5 systemd[1]: Stopped Ollama Service.
Aug 07 15:35:54 i-2y1kobn5 systemd[1]: Started Ollama Service.
Aug 07 15:35:54 i-2y1kobn5 systemd[1]: ollama.service: Main process exited, code=dumped, status=11/SEGV
Aug 07 15:35:54 i-2y1kobn5 systemd[1]: ollama.service: Failed with result 'core-dump'.
Aug 07 15:35:57 i-2y1kobn5 systemd[1]: ollama.service: Scheduled restart job, restart counter is at 3.
Aug 07 15:35:57 i-2y1kobn5 systemd[1]: Stopped Ollama Service.

command return error:

ollama server
Segmentation fault (core dumped)

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

should be the latest one download from here:
https://ollama.com/download/ollama-linux-amd64

ollama --version also reports error: Segmentation fault (core dumped)

Originally created by @garyyang85 on GitHub (Aug 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6227 ### What is the issue? First time to run ollama, follow the guide: https://github.com/ollama/ollama/blob/main/docs/linux.md#manual-install service cannot start, logs: ``` journalctl -u ollama --no-pager Aug 07 15:35:48 i-2y1kobn5 systemd[1]: Started Ollama Service. Aug 07 15:35:48 i-2y1kobn5 systemd[1]: ollama.service: Main process exited, code=dumped, status=11/SEGV Aug 07 15:35:48 i-2y1kobn5 systemd[1]: ollama.service: Failed with result 'core-dump'. Aug 07 15:35:51 i-2y1kobn5 systemd[1]: ollama.service: Scheduled restart job, restart counter is at 1. Aug 07 15:35:51 i-2y1kobn5 systemd[1]: Stopped Ollama Service. Aug 07 15:35:51 i-2y1kobn5 systemd[1]: Started Ollama Service. Aug 07 15:35:51 i-2y1kobn5 systemd[1]: ollama.service: Main process exited, code=dumped, status=11/SEGV Aug 07 15:35:51 i-2y1kobn5 systemd[1]: ollama.service: Failed with result 'core-dump'. Aug 07 15:35:54 i-2y1kobn5 systemd[1]: ollama.service: Scheduled restart job, restart counter is at 2. Aug 07 15:35:54 i-2y1kobn5 systemd[1]: Stopped Ollama Service. Aug 07 15:35:54 i-2y1kobn5 systemd[1]: Started Ollama Service. Aug 07 15:35:54 i-2y1kobn5 systemd[1]: ollama.service: Main process exited, code=dumped, status=11/SEGV Aug 07 15:35:54 i-2y1kobn5 systemd[1]: ollama.service: Failed with result 'core-dump'. Aug 07 15:35:57 i-2y1kobn5 systemd[1]: ollama.service: Scheduled restart job, restart counter is at 3. Aug 07 15:35:57 i-2y1kobn5 systemd[1]: Stopped Ollama Service. ``` command return error: ``` ollama server Segmentation fault (core dumped) ``` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version should be the latest one download from here: https://ollama.com/download/ollama-linux-amd64 ollama --version also reports error: Segmentation fault (core dumped)
GiteaMirror added the bug label 2026-04-12 14:43:50 -05:00
Author
Owner

@rick-github commented on GitHub (Aug 7, 2024):

What's the output of the following commands:
which ollama
ls -l /usr/bin/ollama
ldd /usr/bin/ollama
strace -f /usr/bin/ollama
strace -f /usr/bin/ollama --version

<!-- gh-comment-id:2273008246 --> @rick-github commented on GitHub (Aug 7, 2024): What's the output of the following commands: `which ollama` `ls -l /usr/bin/ollama` `ldd /usr/bin/ollama` `strace -f /usr/bin/ollama` `strace -f /usr/bin/ollama --version`
Author
Owner

@alwqx commented on GitHub (Aug 7, 2024):

you can install with command below in ubuntu 22.04

curl -fsSL https://ollama.com/install.sh | sh

and refer https://github.com/ollama/ollama/blob/main/docs/linux.md for details

<!-- gh-comment-id:2273387056 --> @alwqx commented on GitHub (Aug 7, 2024): you can install with command below in ubuntu 22.04 ```shell curl -fsSL https://ollama.com/install.sh | sh ``` and refer https://github.com/ollama/ollama/blob/main/docs/linux.md for details
Author
Owner

@garyyang85 commented on GitHub (Aug 9, 2024):

@rick-github Thanks for your help, below is the output:

(base) ubuntu@i-2y1kobn5:~$ which ollama
/usr/bin/ollama
(base) ubuntu@i-2y1kobn5:~$ ls -l  /usr/bin/ollama
-rwx--x--x 1 ubuntu ubuntu 585732802 Aug  7 15:32 /usr/bin/ollama
(base) ubuntu@i-2y1kobn5:~$ ldd /usr/bin/ollama
(base) ubuntu@i-2y1kobn5:~$ strace -f /usr/bin/ollama
execve("/usr/bin/ollama", ["/usr/bin/ollama"], 0x7ffcb96c5f58 /* 39 vars */) = 0
brk(NULL)                               = 0x24ca7000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd8effeb40) = -1 EINVAL (Invalid argument)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f69f58ee000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)
(base) ubuntu@i-2y1kobn5:~$ strace -f /usr/bin/ollama --version
execve("/usr/bin/ollama", ["/usr/bin/ollama", "--version"], 0x7fff5ce40710 /* 39 vars */) = 0
brk(NULL)                               = 0x246eb000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc7ddd46d0) = -1 EINVAL (Invalid argument)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f00a9ec9000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)
(base) ubuntu@i-2y1kobn5:~$
<!-- gh-comment-id:2276972435 --> @garyyang85 commented on GitHub (Aug 9, 2024): @rick-github Thanks for your help, below is the output: ``` (base) ubuntu@i-2y1kobn5:~$ which ollama /usr/bin/ollama (base) ubuntu@i-2y1kobn5:~$ ls -l /usr/bin/ollama -rwx--x--x 1 ubuntu ubuntu 585732802 Aug 7 15:32 /usr/bin/ollama (base) ubuntu@i-2y1kobn5:~$ ldd /usr/bin/ollama (base) ubuntu@i-2y1kobn5:~$ strace -f /usr/bin/ollama execve("/usr/bin/ollama", ["/usr/bin/ollama"], 0x7ffcb96c5f58 /* 39 vars */) = 0 brk(NULL) = 0x24ca7000 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffd8effeb40) = -1 EINVAL (Invalid argument) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f69f58ee000 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} --- +++ killed by SIGSEGV (core dumped) +++ Segmentation fault (core dumped) (base) ubuntu@i-2y1kobn5:~$ strace -f /usr/bin/ollama --version execve("/usr/bin/ollama", ["/usr/bin/ollama", "--version"], 0x7fff5ce40710 /* 39 vars */) = 0 brk(NULL) = 0x246eb000 arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc7ddd46d0) = -1 EINVAL (Invalid argument) mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f00a9ec9000 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} --- +++ killed by SIGSEGV (core dumped) +++ Segmentation fault (core dumped) (base) ubuntu@i-2y1kobn5:~$ ```
Author
Owner

@garyyang85 commented on GitHub (Aug 9, 2024):

you can install with command below in ubuntu 22.04

curl -fsSL https://ollama.com/install.sh | sh

and refer https://github.com/ollama/ollama/blob/main/docs/linux.md for details

I followed the manual steps in the link due to my network issue.

<!-- gh-comment-id:2277022880 --> @garyyang85 commented on GitHub (Aug 9, 2024): > you can install with command below in ubuntu 22.04 > > ```shell > curl -fsSL https://ollama.com/install.sh | sh > ``` > > and refer https://github.com/ollama/ollama/blob/main/docs/linux.md for details I followed the manual steps in the link due to my network issue.
Author
Owner

@rick-github commented on GitHub (Aug 9, 2024):

ldd not showing any output is strange. What's the result of these commands:
arch
uname -a
file /usr/bin/ollama
objdump /usr/bin/ollama

<!-- gh-comment-id:2277161114 --> @rick-github commented on GitHub (Aug 9, 2024): `ldd` not showing any output is strange. What's the result of these commands: `arch` `uname -a` `file /usr/bin/ollama` `objdump /usr/bin/ollama`
Author
Owner

@garyyang85 commented on GitHub (Aug 9, 2024):

@rick-github Seems the file is bad? Just download again here https://ollama.com/download/ollama-linux-amd64, confirm the size is same 585.8MB with the first download.
Output:

(base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# arch
x86_64
(base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# uname -a
Linux i-2y1kobn5 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
(base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# file /usr/bin/ollama
/usr/bin/ollama: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, too large section header offset 8072986624
(base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# objdump -x -d -s /usr/bin/ollama
objdump: warning: /usr/bin/ollama has a section extending past end of file
objdump: /usr/bin/ollama: file format not recognized
<!-- gh-comment-id:2277428770 --> @garyyang85 commented on GitHub (Aug 9, 2024): @rick-github Seems the file is bad? Just download again here https://ollama.com/download/ollama-linux-amd64, confirm the size is same 585.8MB with the first download. Output: ``` (base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# arch x86_64 (base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# uname -a Linux i-2y1kobn5 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux (base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# file /usr/bin/ollama /usr/bin/ollama: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, too large section header offset 8072986624 (base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# objdump -x -d -s /usr/bin/ollama objdump: warning: /usr/bin/ollama has a section extending past end of file objdump: /usr/bin/ollama: file format not recognized ```
Author
Owner

@rick-github commented on GitHub (Aug 9, 2024):

Output of
md5sum /usr/bin/ollama
ls -l /lib64/ld-linux-x86-64.so.2
ldd /bin/ls

<!-- gh-comment-id:2277526332 --> @rick-github commented on GitHub (Aug 9, 2024): Output of `md5sum /usr/bin/ollama` `ls -l /lib64/ld-linux-x86-64.so.2` `ldd /bin/ls`
Author
Owner

@alwqx commented on GitHub (Aug 9, 2024):

@rick-github Seems the file is bad? Just download again here ollama.com/download/ollama-linux-amd64, confirm the size is same 585.8MB with the first download. Output:

(base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# arch
x86_64
(base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# uname -a
Linux i-2y1kobn5 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
(base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# file /usr/bin/ollama
/usr/bin/ollama: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, too large section header offset 8072986624
(base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# objdump -x -d -s /usr/bin/ollama
objdump: warning: /usr/bin/ollama has a section extending past end of file
objdump: /usr/bin/ollama: file format not recognized

If I was you, I will try below steps.

download binary and check sha256sum

  1. go to ollama release page, download latest ollama-linux-amd64 and sha256sum.txt
  2. run sha256sum ollama-linux-amd64 and compare output with value in sha256sum.txt

some reasons I guess

  1. check if ubuntu 22.04 should install/update pkgs such as build-essential
sudo apt install build-essential
  1. check cpu and memory
    From the output of your shell root@i-2y1kobn5, It seems you are using a Cloud Computing Instance. Maybe a VM or a docker container. You'd better check if cpu and memory resource is enough to run ollama.
<!-- gh-comment-id:2277627030 --> @alwqx commented on GitHub (Aug 9, 2024): > @rick-github Seems the file is bad? Just download again here [ollama.com/download/ollama-linux-amd64](https://ollama.com/download/ollama-linux-amd64), confirm the size is same 585.8MB with the first download. Output: > > ``` > (base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# arch > x86_64 > (base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# uname -a > Linux i-2y1kobn5 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux > (base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# file /usr/bin/ollama > /usr/bin/ollama: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, too large section header offset 8072986624 > (base) root@i-2y1kobn5:/mnt/vol-5ojabq86/ollama# objdump -x -d -s /usr/bin/ollama > objdump: warning: /usr/bin/ollama has a section extending past end of file > objdump: /usr/bin/ollama: file format not recognized > ``` If I was you, I will try below steps. ## download binary and check sha256sum 1. go to ollama [release page](https://github.com/ollama/ollama/releases), download latest `ollama-linux-amd64` and `sha256sum.txt` 2. run `sha256sum ollama-linux-amd64` and compare output with value in sha256sum.txt ## some reasons I guess 1. check if ubuntu 22.04 should install/update pkgs such as `build-essential` ```shell sudo apt install build-essential ``` 2. check cpu and memory From the output of your shell `root@i-2y1kobn5`, It seems you are using a Cloud Computing Instance. Maybe a VM or a docker container. You'd better check if cpu and memory resource is enough to run ollama.
Author
Owner

@garyyang85 commented on GitHub (Aug 11, 2024):

docker or online install to avoid the issue

<!-- gh-comment-id:2282734993 --> @garyyang85 commented on GitHub (Aug 11, 2024): docker or online install to avoid the issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#3892