Centos下安裝Telegram-cli

1、下載源碼和依賴包
yum install readline-devel.x86_64 libconfig-devel.x86_64 jansson-devel.x86_64

2、下載源碼編譯和安裝:
git clone --recursive https://github.com/vysheng/tg.git
cd tg
./configure
報錯 configure: error: No lua headers found. Try --disable-liblua
解決:./configure --disable-liblua
make -j8
make install

3、激活 API
https://my.telegram.org/apps
從上面的網絡中登錄,獲取公鑰並保存到服務器中
我保存的路徑是/root/tg-server.pub

4、使用公鑰登錄telegram
bin/telegram-cli -k /root/tg-server.pub
輸入命令後,稍等一下會提示你輸入手機號和驗證碼
輸入完成後就可以進行收發消息了
Centos下安裝Telegram-cli

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章