paul-nameless / tg

terminal telegram client
The Unlicense
938 stars 76 forks source link

libtdjson.so: No such file or directory #179

Closed tobip closed 3 years ago

tobip commented 4 years ago

I installed telegram-tg 0.6.0-1 from AUR on Manjaro. I did not create the config.py file manually. I ran tg in terminal, I entered my phone number. Then it couldn't find the ~/.cache/tg/files folder, so I created it manually and re-run tg.

Next this error appears:

File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/python3.8/site-packages/telegram/lib/linux/libtdjson.so: cannot open shared object file: No such file or directory

What do you recommend?

tobip commented 4 years ago

For now I could resolve it by manually compiling tdlib and redirecting tg to my compiled binary. :+1:

paul-nameless commented 4 years ago

Looks like it wasn't able to find a built in libtdjson.so which comes with telegram library. Is this file exists on you FS? /usr/lib/python3.8/site-packages/telegram/lib/linux/libtdjson.so

tobip commented 4 years ago

Yes the file exists: .rw-r--r-- 21M root 14 Sep 19:41 libtdjson.so

And I don't undersrtand why tg would not find that file.

jugendhacker commented 4 years ago

Looks like it wasn't able to find a built in libtdjson.so which comes with telegram library.

In the latest version of the AUR package I patched it to not use the precompiled binaries, so you need to install libtd, which is a dependency for python-telegram now

paul-nameless commented 4 years ago

@tobip is this problem still relative?

tobip commented 4 years ago

For me it is solved, since I added following line to my ~/tg/config.py: TDLIB_PATH = '/usr/local/lib/libtdjson.so.1.6.8'