yagop / telegram-bot

UNMAINTAINED - A Telegram Bot based on plugins
GNU General Public License v2.0
848 stars 502 forks source link

Error launching in arch linux #277

Open takasurazeem opened 9 years ago

takasurazeem commented 9 years ago

telegram-bot]$ ./launch.sh Telegram-cli version 1.3.3, Copyright (C) 2013-2015 Vitaly Valtman Telegram-cli comes with ABSOLUTELY NO WARRANTY; for details type show_license'. This is free software, and you are welcome to redistribute it under certain conditions; typeshow_license' for details. Telegram-cli uses libtgl version 2.0.3 Telegram-cli uses libpython version 3.4.3 I: config dir=[/home/takasur/.telegram-cli] *\ lua: error loading module 'ssl.core' from file '/usr/lib/lua/5.3/ssl.so': /usr/lib/lua/5.3/ssl.so: undefined symbol: luaL_checkint

JuanPotato commented 9 years ago

I've run this on arch linux on two devices now. Tell me what steps you have done to get to this point and I will help you.

psamim commented 9 years ago

I have the same problem in arch linux. I get the same error. I just cloned the repo and did the install.

rockneurotiko commented 9 years ago

I had many problems with arch, until I was able to install it, don't know really how. My original problem was the lua version, and seems that here is happening the same, because you are using lua 5.3, and if I don't remember bad, some libraries are only for lua<=5.2

Try to install lua5.2 and the luarocks for lua5.2 export them, or change the launch to execute that ones :smile:

tvdstaaij commented 9 years ago

Arch is meant to be up-to-date however. Intentionally keeping packages at a lower version is a pain and can lead to conflicts with other packages.

I have the same issue after recompiling tg because it didn't work anymore with the new lua version. Used to work perfectly fine on Arch with lua 5.2. Any way of working around this without downgrading lua?

pando85 commented 9 years ago

I'm arch user too. I have the same problem for testing but I run my bot in debian based server. Anyone thing about using docker?

tvdstaaij commented 9 years ago

Although this is advised against on the Arch wiki I decided to downgrade lua for the time being. Below are the steps that worked for me.

1) Override lua related packages (pacman -Q | grep lua) with the most recent locally cached versions from before May 2015. First check the cache directory for those packages:

cd /var/cache/pacman/pkg
ls -l | grep lua

Then install the packages, for my Arch ARM system this was:

pacman -U lua-5.2.4-1-armv7h.pkg.tar.xz
pacman -U lua-sec-0.5-1-armv7h.pkg.tar.xz
pacman -U lua-socket-3.0rc1-4-armv7h.pkg.tar.xz
pacman -U luarocks-2.2.0-1-any.pkg.tar.xz

2) Completely rebuild tg:

make clean
./configure
make

3) Optionally, to prevent the packages from being upgraded by pacman, use the IgnorePkg directive in /etc/pacman.conf:

IgnorePkg = lua lua-sec lua-socket luarocks

Note that this will break the latest vim package because it's built against lua 5.3. You can use vim-minimal (which doesn't have scripting language bindings) instead. Of course it will also break any other official package that is built against lua.

psamim commented 9 years ago

I get it running using Docker. This is my Dockerfile.

FROM ubuntu
RUN apt-get update -y && apt-get install -y luajit luarocks libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make git
RUN git clone --recursive https://github.com/vysheng/tg.git /tg
RUN cd /tg && ./configure --disable-python
RUN cd /tg && make
COPY server.pub /etc/telegram-cli/server.pub
ENTRYPOINT /tg/bin/telegram-cli

And the run

docker build -t tg .
docker --rm -ti tg
Aghabeiki commented 9 years ago

you don't need change any core file and config of arch , just do installation step by step your self and install needed package step by step said as in launch script

solomid99 commented 8 years ago

hi when i type ./launch.sh install :

configure: error: No supported python lib version found. Try --disable-python Error. Exiting.

how to disable python???

yagop commented 8 years ago

http://i.giphy.com/oV4DOTSXRhRMA.gif