【问题标题】:Raspberry Pi - Raspberry OS - Telegram-CLIRaspberry Pi - Raspberry 操作系统 - Telegram-CLI
【发布时间】:2020-07-15 21:20:39
【问题描述】:

我需要帮助才能在我的 Raspberry Pi 上安装电报 CLI。有很多指令,但没有一个有效

例如:

  1. install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make lua-lgi git

  2. cd /usr/local/src

  3. git clone --recursive https://github.com/vysheng/tg.git && cd tg

  4. ./configure

  5. make

输出:

gcc -I. -I. -I./tgl -g -O2  -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/lua5.2  -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -iquote ./tgl/tl-parser -c -MP -MD -MF dep/tl-parser.d -MQ objs/tl-parser.o -o objs/tl-parser.o tgl/tl-parser/tl-parser.c

tgl/tl-parser/tl-parser.c: In function ‘tl_parse_args134’:

tgl/tl-parser/tl-parser.c:1907:26: error:bash: oot@raspberrypi:/usr/local/src/tg#: No such file or directory

 ‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]

sprintf (s, "%lld", lrand48 () * (1ll << 32) + lrand48 ());
                          ^
tgl/tl-parser/tl-parser.c:1907:9: note: ‘sprintf’ output between 2 and 21 bytes into a destination of size 20

         sprintf (s, "%lld", lrand48 () * (1ll << 32) + lrand48 ());

         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile.tl-parser:4: objs/tl-parser.o] Error 1

感谢您的帮助。

【问题讨论】:

    标签: ubuntu raspberry-pi debian telegram


    【解决方案1】:

    我点击以下链接:

    https://github.com/vysheng/tg/issues/1610

    sudo nano /tg/Makefile
    

    移除选项 -Werror

    之后:

    sudo nano tgl/mtproto-utils.c
    

    转到第 101 行

    在开头添加 //(注释)

    写下来 ([ctrl]+X)

    重做

    这对我有用!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-22
      • 2021-12-22
      • 2014-01-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-13
      • 1970-01-01
      相关资源
      最近更新 更多