Skip to content

Instantly share code, notes, and snippets.

@bretton
Last active November 10, 2024 10:08
Show Gist options
  • Save bretton/c84d7b3eba34f730991f567986d11f53 to your computer and use it in GitHub Desktop.
Save bretton/c84d7b3eba34f730991f567986d11f53 to your computer and use it in GitHub Desktop.
Why won't open-webui install on FreeBSD 14.1?

Why won't open-webui install on FreeBSD 14.1?

If you try install open-webui in FreeBSD 14.1 you'll run into troubles.

1. Pip method

If using pip install --user open-webui it will crash with the following error

ERROR: Could not find a version that satisfies the requirement onnxruntime>=1.14.1 (from chromadb) (from versions: none)
ERROR: No matching distribution found for onnxruntime>=1.14.1

2. Install from github sources

If trying to build from a clone of the github repo it will fail on the frontend build step of npm install:

npm error code EBADPLATFORM
npm error notsup Unsupported platform for [email protected]: wanted {"os":"win32,darwin,linux"} (current: {"os":"freebsd"})
npm error notsup Valid os:  win32,darwin,linux
npm error notsup Actual os: freebsd
npm error A complete log of this run can be found in: /home/bretton/.npm/_logs/2024-11-09T20_28_09_634Z-debug-0.log

But onnxruntime is installed?

You can install onnxruntime with pkg install onnxruntime and get version 1.18.2_1

Wait, I can't manually build onnxruntime?

If you try manually build onnxruntime from source

bash build.sh --config RelWithDebInfo --build_shared_lib --parallel --compile_no_warning_as_error --skip_submodule_sync --allow_running_as_root

it fails with the error

patch: unrecognized option `--binary'

You can fix this by editing the file onnxruntime/cmake/CMakeLists.txt and include near the top:

set(Patch_EXECUTABLE "/usr/local/bin/gpatch")

then run again

bash build.sh --config RelWithDebInfo --build_shared_lib --parallel --compile_no_warning_as_error --skip_submodule_sync --allow_running_as_root

however it will still fail, with a new error

fatal error: 'logging.h' file not found

Summary

Although onnxruntime can be installed from ports, or from source with some TLC, the installed version isn't accepted by open-webui.

@bretton
Copy link
Author

bretton commented Nov 9, 2024

Librechat isn't supported either

@bretton
Copy link
Author

bretton commented Nov 10, 2024

https://github.com/josiahmattern/chatbot-app looked promising too, but fails because

Failed to download swc package from https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-14.2.15.tgz

and manual install with npm install @next/swc-freebsd-x64 just results in core dump when running npm run dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment