khoj-ai / khoj

Your AI second brain. Self-hostable. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI (e.g gpt, claude, gemini, llama, qwen, mistral).
https://khoj.dev
GNU Affero General Public License v3.0
14.77k stars 735 forks source link

does not work on ubuntu: version `GLIBC_2.35' not found #378

Closed kforner closed 1 year ago

kforner commented 1 year ago

After installation using the latest debian package khoj_0.10.0_amd64.deb:

/opt/Khoj 
[39318] SPLASH: Failed to load Tcl/Tk libraries!
[39326] Error loading Python lib '/tmp/_MEIJcR2vd/libpython3.9.so.1.0': dlopen: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /tmp/_MEIJcR2vd/libpython3.9.so.1.0)
uname -a
Linux valhalla 5.19.17-051917-generic #202210240939 SMP PREEMPT_DYNAMIC Mon Oct 24 09:43:01 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:    20.04
Codename:   focal

▶ dpkg -l | grep "Python language"
ii  libpython2.7-minimal:amd64                                  2.7.18-1~20.04.3                           amd64        Minimal subset of the Python language (version 2.7)
ii  libpython3.5-minimal:amd64                                  3.5.2-2ubuntu0~16.04.4                     amd64        Minimal subset of the Python language (version 3.5)
rc  libpython3.6-minimal:amd64                                  3.6.9-1~18.04                              amd64        Minimal subset of the Python language (version 3.6)
rc  libpython3.7-minimal:amd64                                  3.7.5-2~19.10ubuntu1                       amd64        Minimal subset of the Python language (version 3.7)
ii  libpython3.8-minimal:amd64                                  3.8.10-0ubuntu1~20.04.7                    amd64        Minimal subset of the Python language (version 3.8)
ii  python2.7-minimal                                           2.7.18-1~20.04.3                           amd64        Minimal subset of the Python language (version 2.7)
ii  python3-minimal                                             3.8.2-0ubuntu2                             amd64        minimal subset of the Python language (default python3 version)
ii  python3.5-minimal                                           3.5.2-2ubuntu0~16.04.4                     amd64        Minimal subset of the Python language (version 3.5)
rc  python3.6-minimal                                           3.6.9-1~18.04                              amd64        Minimal subset of the Python language (version 3.6)
rc  python3.7-minimal                                           3.7.5-2~19.10ubuntu1                       amd64        Minimal subset of the Python language (version 3.7)
ii  python3.8-minimal                                           3.8.10-0ubuntu1~20.04.7                    amd64        Minimal subset of the Python language (version 3.8)
sabaimran commented 1 year ago

Thanks for raising the issue (with relevant details!) and sorry for the installation roadblocks. As it turns out, GLIBC_2.35 isn't available on Ubuntu 20.04 -- as showing in this and this discussion.

For now, I think glibc 2.35 is just going to be a system requirement. I'll document that some place.

You should still be able to use the application via the python package or Docker, but let me know if that doesn't work either. Here's a sample docker-compose.yml file that can help you get started.

sabaimran commented 1 year ago

You could go through the task of updating your glibc version, but I don't recommend this as it's a system package and can lead to other issues in your OS.

kforner commented 1 year ago

You should still be able to use the application via the python package

no. cf https://github.com/khoj-ai/khoj/issues/391

kforner commented 1 year ago

For now, I think glibc 2.35 is just going to be a system requirement. I'll document that some place.

ubuntu 20.04 is a LTS, meaning lots of people and enterprises still use it.

Thanks for your help.

debanjum commented 1 year ago

Hey @kforner, I was able to finally reproduce this issue on an Ubuntu 20.04.

Can you verify that using the latest khoj debian package here fixes the issue for you?

kforner commented 1 year ago

Hey. I could not find any deb package in your link.

debanjum commented 1 year ago

Ah those build artifacts have expired. Could you try install the .deb package visible at the bottom of this build? Or if that's expired (in 3 days from today) a .deb package from the latest desktop app build here

kforner commented 1 year ago

This almost worked:

/opt/Khoj 
[08:52:05 AM] INFO     🌘 Starting Khoj                                                                                                                                    main.py:69
/opt/Khoj: symbol lookup error: /tmp/_MEI977qgB/libQt6WaylandClient.so.6: undefined symbol: wl_proxy_marshal_flags
debanjum commented 1 year ago

One slow step at a time to support Ubuntu 20.04 😅. Which version of Wayland do you have installed on your machine?

Based on this bug report, the default Wayland on Ubuntu 20.04 is unsupported by Khoj. Khoj uses PySide version >= 6.5.1. PySide versions >=6.5.1 expect a newer Wayland which support wl_proxy_marshal_flags. Potential solutions:

debanjum commented 1 year ago

Closing this issue as we've removed dependency from PySide for the Khoj GUI/Desktop app