[GH-ISSUE #3367] Failed to load dynamic library on Windows when the user name and path have Chinese characters. #64108

Closed
opened 2026-05-03 16:15:14 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @mili-tan on GitHub (Mar 27, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3367

Originally assigned to: @BruceMacD on GitHub.

What is the issue?

Failed to load dynamic library on Windows when the user name and path have Chinese characters.
I tried replacing the user with a non-Chinese name and the problem no longer occurs.

time=2024-03-27T14:21:24.451+08:00 level=INFO source=images.go:710 msg="total blobs: 3"
time=2024-03-27T14:21:24.476+08:00 level=INFO source=images.go:717 msg="total unused blobs removed: 0"
time=2024-03-27T14:21:24.477+08:00 level=INFO source=routes.go:1021 msg="Listening on 127.0.0.1:11434 (version 0.1.28)"
time=2024-03-27T14:21:24.477+08:00 level=INFO source=payload_common.go:107 msg="Extracting dynamic libraries..."
time=2024-03-27T14:21:24.640+08:00 level=INFO source=payload_common.go:146 msg="Dynamic LLM libraries [cpu cpu_avx2 cuda_v11.3 cpu_avx]"
time=2024-03-27T14:21:31.095+08:00 level=INFO source=gpu.go:94 msg="Detecting GPU type"
time=2024-03-27T14:21:31.095+08:00 level=INFO source=gpu.go:265 msg="Searching for GPU management library nvml.dll"
time=2024-03-27T14:21:31.104+08:00 level=INFO source=gpu.go:311 msg="Discovered GPU libraries: [c:\\Windows\\System32\\nvml.dll C:\\WINDOWS\\system32\\nvml.dll]"
time=2024-03-27T14:21:31.119+08:00 level=INFO source=gpu.go:323 msg="Unable to load CUDA management library c:\\Windows\\System32\\nvml.dll: nvml vram init failure: 4"
time=2024-03-27T14:21:31.121+08:00 level=INFO source=gpu.go:323 msg="Unable to load CUDA management library C:\\WINDOWS\\system32\\nvml.dll: nvml vram init failure: 4"
time=2024-03-27T14:21:31.121+08:00 level=INFO source=gpu.go:265 msg="Searching for GPU management library rocm_smi64.dll"
time=2024-03-27T14:21:31.131+08:00 level=INFO source=gpu.go:311 msg="Discovered GPU libraries: []"
time=2024-03-27T14:21:31.131+08:00 level=INFO source=cpu_common.go:11 msg="CPU has AVX2"
time=2024-03-27T14:21:31.131+08:00 level=INFO source=cpu_common.go:11 msg="CPU has AVX2"
time=2024-03-27T14:21:31.131+08:00 level=INFO source=llm.go:77 msg="GPU not available, falling back to CPU"
time=2024-03-27T14:21:31.131+08:00 level=INFO source=dyn_ext_server.go:385 msg="Updating PATH to C:\\Users\\李\\AppData\\Local\\Temp\\ollama2276364636\\cpu_avx2;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Python311\\Scripts\\;C:\\Python311\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\150\\DTS\\Binn\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\Common Files\\Autodesk Shared\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\VSShell\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\IDE\\PrivateAssemblies\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\DTS\\Binn\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Git\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\maven\\apache-maven-3.9.1\\bin;C:\\Program Files\\nodejs\\;C:\\Program Files (x86)\\Java\\jdk-1.8\\bin;C:\\Program Files (x86)\\Java\\jdk-1.8\\jre\\bin;C:\\Program Files\\Java\\jdk1.8.0_321\\bin;C:\\Users\\李\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\李\\.dotnet\\tools;C:\\Users\\李\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\JetBrains\\IntelliJ IDEA 2023.1.1\\bin;;C:\\Users\\李\\AppData\\Roaming\\npm;;C:\\Users\\李\\AppData\\Local\\Programs\\Ollama"
time=2024-03-27T14:21:31.131+08:00 level=WARN source=llm.go:162 msg="Failed to load dynamic library C:\\Users\\李\\AppData\\Local\\Temp\\ollama2276364636\\cpu_avx2\\ext_server.dll  Unable to load dynamic library: Unable to load dynamic server library: \xd5Ҳ\xbb\xb5\xbdָ\xb6\xa8\xb5\xc4ģ\xbf顣\r\n"
[GIN] 2024/03/27 - 14:21:31 | 500 |    1.3342561s |       127.0.0.1 | POST     "/api/chat"

What did you expect to see?

When requesting /api/chat

Steps to reproduce

No response

Are there any recent changes that introduced the issue?

No response

OS

Windows

Architecture

amd64

Platform

No response

Ollama version

No response

GPU

Nvidia

GPU info

No response

CPU

Intel

Other software

No response

Originally created by @mili-tan on GitHub (Mar 27, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3367 Originally assigned to: @BruceMacD on GitHub. ### What is the issue? Failed to load dynamic library on Windows when the user name and path have Chinese characters. I tried replacing the user with a non-Chinese name and the problem no longer occurs. ``` time=2024-03-27T14:21:24.451+08:00 level=INFO source=images.go:710 msg="total blobs: 3" time=2024-03-27T14:21:24.476+08:00 level=INFO source=images.go:717 msg="total unused blobs removed: 0" time=2024-03-27T14:21:24.477+08:00 level=INFO source=routes.go:1021 msg="Listening on 127.0.0.1:11434 (version 0.1.28)" time=2024-03-27T14:21:24.477+08:00 level=INFO source=payload_common.go:107 msg="Extracting dynamic libraries..." time=2024-03-27T14:21:24.640+08:00 level=INFO source=payload_common.go:146 msg="Dynamic LLM libraries [cpu cpu_avx2 cuda_v11.3 cpu_avx]" time=2024-03-27T14:21:31.095+08:00 level=INFO source=gpu.go:94 msg="Detecting GPU type" time=2024-03-27T14:21:31.095+08:00 level=INFO source=gpu.go:265 msg="Searching for GPU management library nvml.dll" time=2024-03-27T14:21:31.104+08:00 level=INFO source=gpu.go:311 msg="Discovered GPU libraries: [c:\\Windows\\System32\\nvml.dll C:\\WINDOWS\\system32\\nvml.dll]" time=2024-03-27T14:21:31.119+08:00 level=INFO source=gpu.go:323 msg="Unable to load CUDA management library c:\\Windows\\System32\\nvml.dll: nvml vram init failure: 4" time=2024-03-27T14:21:31.121+08:00 level=INFO source=gpu.go:323 msg="Unable to load CUDA management library C:\\WINDOWS\\system32\\nvml.dll: nvml vram init failure: 4" time=2024-03-27T14:21:31.121+08:00 level=INFO source=gpu.go:265 msg="Searching for GPU management library rocm_smi64.dll" time=2024-03-27T14:21:31.131+08:00 level=INFO source=gpu.go:311 msg="Discovered GPU libraries: []" time=2024-03-27T14:21:31.131+08:00 level=INFO source=cpu_common.go:11 msg="CPU has AVX2" time=2024-03-27T14:21:31.131+08:00 level=INFO source=cpu_common.go:11 msg="CPU has AVX2" time=2024-03-27T14:21:31.131+08:00 level=INFO source=llm.go:77 msg="GPU not available, falling back to CPU" time=2024-03-27T14:21:31.131+08:00 level=INFO source=dyn_ext_server.go:385 msg="Updating PATH to C:\\Users\\李\\AppData\\Local\\Temp\\ollama2276364636\\cpu_avx2;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Python311\\Scripts\\;C:\\Python311\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files\\dotnet\\;C:\\Program Files (x86)\\Microsoft SQL Server\\150\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\150\\DTS\\Binn\\;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\Common Files\\Autodesk Shared\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\VSShell\\Common7\\IDE\\;C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\Common7\\IDE\\PrivateAssemblies\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\DTS\\Binn\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Git\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\maven\\apache-maven-3.9.1\\bin;C:\\Program Files\\nodejs\\;C:\\Program Files (x86)\\Java\\jdk-1.8\\bin;C:\\Program Files (x86)\\Java\\jdk-1.8\\jre\\bin;C:\\Program Files\\Java\\jdk1.8.0_321\\bin;C:\\Users\\李\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\李\\.dotnet\\tools;C:\\Users\\李\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\JetBrains\\IntelliJ IDEA 2023.1.1\\bin;;C:\\Users\\李\\AppData\\Roaming\\npm;;C:\\Users\\李\\AppData\\Local\\Programs\\Ollama" time=2024-03-27T14:21:31.131+08:00 level=WARN source=llm.go:162 msg="Failed to load dynamic library C:\\Users\\李\\AppData\\Local\\Temp\\ollama2276364636\\cpu_avx2\\ext_server.dll Unable to load dynamic library: Unable to load dynamic server library: \xd5Ҳ\xbb\xb5\xbdָ\xb6\xa8\xb5\xc4ģ\xbf顣\r\n" [GIN] 2024/03/27 - 14:21:31 | 500 | 1.3342561s | 127.0.0.1 | POST "/api/chat" ``` ### What did you expect to see? When requesting `/api/chat` ### Steps to reproduce _No response_ ### Are there any recent changes that introduced the issue? _No response_ ### OS Windows ### Architecture amd64 ### Platform _No response_ ### Ollama version _No response_ ### GPU Nvidia ### GPU info _No response_ ### CPU Intel ### Other software _No response_
GiteaMirror added the bug label 2026-05-03 16:15:14 -05:00
Author
Owner

@BruceMacD commented on GitHub (Mar 27, 2024):

Hi @mili-tan, thanks for opening the issue. I have a change open that I believe should fix this problem in an upcoming release.

<!-- gh-comment-id:2022972450 --> @BruceMacD commented on GitHub (Mar 27, 2024): Hi @mili-tan, thanks for opening the issue. I have a change open that I believe should fix this problem in an upcoming release.
Author
Owner

@zxq1002 commented on GitHub (Mar 29, 2024):

Looking forward to a quick fix.

<!-- gh-comment-id:2026421320 --> @zxq1002 commented on GitHub (Mar 29, 2024): Looking forward to a quick fix.
Author
Owner

@Aadward commented on GitHub (Mar 29, 2024):

I fixed this issue with two changes:

  1. Change model path environment variable OLLAMA_MODELS to a path with only ASCII character
  2. Change TEMP (and TMP if exist) to a path with only ASCII character, too.

Hope useful to you.

<!-- gh-comment-id:2027516515 --> @Aadward commented on GitHub (Mar 29, 2024): I fixed this issue with two changes: 1. Change model path environment variable OLLAMA_MODELS to a path with only ASCII character 2. Change TEMP (and TMP if exist) to a path with only ASCII character, too. Hope useful to you.
Author
Owner

@shuttlebros commented on GitHub (Apr 11, 2024):

My username is Japanese, but I am experiencing the same problem.
The version of ollama that is causing the problem is 0.1.31
When is this going to be fixed?

<!-- gh-comment-id:2048640633 --> @shuttlebros commented on GitHub (Apr 11, 2024): My username is Japanese, but I am experiencing the same problem. The version of ollama that is causing the problem is 0.1.31 When is this going to be fixed?
Author
Owner

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

This should be fixed now in 0.1.33. If you're still seeing it with the new release, please let us know and I'll reopen.

<!-- gh-comment-id:2094902758 --> @dhiltgen commented on GitHub (May 5, 2024): This should be fixed now in 0.1.33. If you're still seeing it with the new release, please let us know and I'll reopen.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#64108