# Llama-cpp-python binding missing symbol in llama.cpp libllama docker image

**URL:** <https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200>\
**Category:** General Discussion\
**Created:** [March 17, 2025, 8:39pm UTC](https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200 "2025-03-17T20:39:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjmnoble](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@pjmnoble](https://community.amperecomputing.com/u/pjmnoble)\
**Post date:** [March 17, 2025, 8:39pm UTC](https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200/1 "2025-03-17T20:39:17Z")

</div>

Just got my ALtra system and running aiming to deploy it for lower power consumption inference Using Rocky Linux 9.5

wanted to try out the llama.cpp docker image and used AmpereComputingAI:llama.cpp as the basis of a Docker that also serves out Jupyter notebooks.

I pip installed the llama-cpp-python (0.3.8) into the image but can’t import the Llama class.

error message when it gets to the line  
from llama\_cpp import Llama  
is:

RuntimeError: Failed to load shared library ‘[/usr/local/lib/python3.10/dist-packages/llama\_cpp/lib/libllama.so](http://138.253.154.185:8895/usr/local/lib/python3.10/dist-packages/llama_cpp/lib/libllama.so)’: [/usr/local/lib/python3.10/dist-packages/llama\_cpp/lib/libllama.so](http://138.253.154.185:8895/usr/local/lib/python3.10/dist-packages/llama_cpp/lib/libllama.so): undefined symbol: ggml\_backend\_reg\_count

seems to be. looking of for a symbol in libllama.so which is not there so ? is the version of llama.cpp in the docker image a bit older ? Tried with llama-cpp-python 0.3.6 in case but no joy.

update:  
so installing llama-cpp-python involves compiling a new version of libllama.so (the one in at /usr/local/lib/python3.10/dist-packages/llama\_cpp/lib/libllama.so) while the Ampere optimised llama .cpp in the docker (in /llm) is then, presumably ignored. Not sure if the compilation in the docker environment captures the Ampere optimisations - also given that llama-cpp-python is pointing at the version of libllama.so created during its own installation, I’m guessing the issue is primarily with llama-cpp-python ? Not sure if I shoudl be passing some parameters to CMake prior to the pip install to get correct compilation in this docker ?

---

<div class="post-metadata">

**Author:** ![dneary](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@dneary](https://community.amperecomputing.com/u/dneary)\
**Post date:** [March 18, 2025, 6:10pm UTC](https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200/2 "2025-03-18T18:10:00Z")

</div>

Hi @pjmnoble ! This is a question that maybe @kkrysa can help answer. I am not sure if pip installing a module on top of the Ampere base image would cause problems.

Dave.

---

<div class="post-metadata">

**Author:** ![dneary](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@dneary](https://community.amperecomputing.com/u/dneary)\
**Post date:** [March 25, 2025, 2:13pm UTC](https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200/3 "2025-03-25T14:13:11Z")

</div>

Popping this back to the top of the stack - anyone familiar with the llama.cpp image from AmpereComputing? Tagging @trigoni for awareness - Tony, do you know who might be able to help @pjmnoble ?

---

<div class="post-metadata">

**Author:** ![kkrysa](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/kkrysa/32/42_2.png) [@kkrysa](https://community.amperecomputing.com/u/kkrysa)\
**Post date:** [March 27, 2025, 4:24pm UTC](https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200/4 "2025-03-27T16:24:49Z")

</div>

I’m happy to help in bringing the right people with the required technical expertise. I’ll share the link to the thread to our AI engineering team.

---

<div class="post-metadata">

**Author:** ![kkrysa](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.amperecomputing.com/kkrysa/32/42_2.png) [@kkrysa](https://community.amperecomputing.com/u/kkrysa)\
**Post date:** [March 27, 2025, 4:33pm UTC](https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200/5 "2025-03-27T16:33:45Z")

</div>

Already heard back. “[The Ampere AI engineering team is] already working on updating our fork of llama-cpp-python”. Also, sorry for such a late reply, I was away at a conference and sick since coming back.

---

<div class="post-metadata">

**Author:** ![pjmnoble](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@pjmnoble](https://community.amperecomputing.com/u/pjmnoble)\
**Post date:** [March 28, 2025, 5:32pm UTC](https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200/6 "2025-03-28T17:32:05Z")

</div>

Sounds great - I’ll keep an eye out for releases

---

<div class="post-metadata">

**Author:** ![dkupnicki](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@dkupnicki](https://community.amperecomputing.com/u/dkupnicki)\
**Post date:** [March 31, 2025, 1:51pm UTC](https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200/7 "2025-03-31T13:51:42Z")

</div>

We’ve published [a new version of llama-cpp-python](https://github.com/AmpereComputingAI/llama-cpp-python/releases/tag/v2.2.1) and our docker image: [AmpereComputingAI/llama.cpp:2.2.1](https://hub.docker.com/layers/amperecomputingai/llama.cpp/2.2.1/images/sha256-cbe86e4615b0a74c9cd1641d146280c041b048276696c8d431206d48eb1cdb08). Our version of llama-cpp-python is based on a slightly older version of llama-cpp-python (v0.3.2) for compatibility with the AmpereComputingAI/llama.cpp docker image. We’re currently working on bringing our optimized llama.cpp docker image to a newer version and we’ll release a newer version of llama-cpp-python then.

To install it just download the .whl file and run `python3 -m pip install llama_cpp_python-0.3.2-cp312-cp312-linux_aarch64.whl` in a docker container.

---

<div class="post-metadata">

**Author:** ![wolskies](https://avatars.discourse-cdn.com/v4/letter/w/c67d28/32.png) [@wolskies](https://community.amperecomputing.com/u/wolskies)\
**Post date:** [February 17, 2026, 4:11pm UTC](https://community.amperecomputing.com/t/llama-cpp-python-binding-missing-symbol-in-llama-cpp-libllama-docker-image/1200/8 "2026-02-17T16:11:44Z")

</div>

Hi, just wanted to say thanks for the llama.cpp docker work - made what seemed like a hard problem easy!! Kudos
