教程:使用VPS搭建自己的Telegram RSS中文订阅机器人

2018年3月29日 49 条评论 6.45k 次阅读 14 人点赞

前言

由于RSSBOT中文订阅机器人服务器负载过重,已经不再提供新的订阅,大佬们纷纷开始自己搭建RSSBOT中文订阅机器人,博主也不甘示弱,搭建了一个订阅机器人,这里将教程分享一下(大佬勿喷)

博主刚搭建好的RSSBOT,欢迎使用 http://t.me/sabiarss_bot

准备

  • 一台海外VPS(博主用的瓦工)
  • 一个Telegram账号
  • SSH客户端

一、申请一个自己的Bot

这里先介绍一下怎么向Botfather申请一个自己的Bot。

1.1找到Botfather,下面是Botfather的账号

@BotFather

1.2输入/newbot即可新建一个Bot,记住你的API TOKEN

1.3输入/mybots找到自己的bot,选择他,然后选择Edit Bot,选择Edit Commands就可以输入你的指令了。

例如:

/rss       - 显示当前订阅的 RSS 列表,加 raw 参数显示链接
/sub       - 订阅一个 RSS: /sub http://example.com/feed.xml
/unsub     - 退订一个 RSS: /unsub http://example.com/feed.xml
/unsubthis - 使用此命令回复想要退订的 RSS 消息即可退订, 不支持 Channel
/export    - 导出为 OPML

好的,这个时候你的Bot已经创建成功了,让我们打开SSH客户端,进行下一步操作

二、安装中文 Telegram RSS 机器人

这里我使用的是iovxw大佬的机器人程序,参考链接:https://github.com/iovxw/rssbot

2.1 安装依赖

apt-get install git openssl libssl-dev pkg-config

2.2 下载源码

下载地址:https://github.com/iovxw/rssbot/releases

git clone https://github.com/iovxw/rssbot.git

2.3 安装 Rust Nightly

curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
source $HOME/.cargo/env

2.4 进入目录编译

cd rssbot #进入目录
cargo build --release #编译安装

2.5 安装成功

2.6 进入运行目录

cd target/release

2.7 运行

./rssbot DATAFILE TELEGRAM-BOT-TOKEN

DATAFILE 为数据库保存路径 (其实就是一个 json 文件, 不需要手动创建)
TELEGRAM-BOT-TOKEN就是你创建的机器人的 Token

如果想一直运行可以用screen

本次安装使用搬瓦工的VPS,如果你想搜索关于搬瓦工VPS的评测,可以点击下面的链接

https://www.sabia.cc/search/%E6%90%AC%E7%93%A6%E5%B7%A5/

使用方法

  • 直接关注 @RustRssBot 机器人即可。
  • 订阅方法及命令如下
/rss       - 显示当前订阅的 RSS 列表,加 raw 参数显示链接
/sub       - 订阅一个 RSS: /sub http://example.com/feed.xml
/unsub     - 退订一个 RSS: /unsub http://example.com/feed.xml
/unsubthis - 使用此命令回复想要退订的 RSS 消息即可退订, 不支持 Channel

使用示例

订阅

  • 个人订阅(直接对话机器人即可):/sub https://www.sabia.cc/feed
  • 群组订阅(群内发以下信息即可):/sub https://www.sabia.cc/feed
  • 频道订阅(直接对话机器人即可):/sub @sabiarss https://www.sabia.cc/feed

退订

  • 个人订阅(直接对话机器人即可):/unsub https://www.sabia.cc/feed
  • 群组订阅(群内发以下信息即可):/unsub https://www.sabia.cc/feed
  • 频道订阅(直接对话机器人即可):/unsub @sabiarss https://www.sabia.cc/feed

查看列表

  • 查看个人订阅列表(直接对话机器人即可):/rss
  • 查看群组订阅列表(群内发以下信息即可):/rss
  • 查看频道订阅列表(直接对话机器人即可):/rss @sabiarss

显示 RSS 链接

  • 查看个人订阅列表并显示订阅链接(直接对话机器人即可):/rss raw
  • 查看群组订阅列表并显示订阅链接(直接对话机器人即可):/rss raw
  • 查看频道订阅列表并显示订阅链接(直接对话机器人即可):/rss @sabiarss raw

Joker

这个人太懒什么东西都没留下

文章评论(49)

  • sooele

    搬运工路过

    2018年3月29日
  • zhujiwiki

    刚说瞌睡了就有枕头送过来了。
    也准备搭建个

    2018年3月30日
    • Joker

      @zhujiwiki 惊现t66y大佬

      2018年3月30日
  • Zip

    围观大佬操作。@(吐舌)

    2018年3月30日
  • lewuyang

    [root /]# curl -s https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly
    sh: line 69: HOME: unbound variable
    这是怎么回事

    2018年4月15日
  • lemon粟

    最后一步安装出现大量报错,找不到token,这是怎么回事?我是用putty登录的,需不需要换成X-Shell,Q求回复

    2018年5月5日
    • Joker

      @lemon粟 你需要更改为自己的token,token就是是你找botfather申请的api token

      2018年5月5日
      • lemon粟

        @Joker Rust is ready to roll.

        [root@lemon1 ~]# cd rssbot-1.4.2
        [root@lemon1 rssbot-1.4.2]# cargo build --release
        Compiling phf_shared v0.7.21
        Compiling proc-macro2 v0.1.10
        error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
        --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/s rc/unstable.rs:64:33
        |
        64 | proc_macro::TokenNode::Group(delim, (s.0).0)
        | ^^^^^^^^^ Could not find `TokenNode` in `pr oc_macro`

        error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
        --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/s rc/unstable.rs:71:33
        |
        71 | proc_macro::TokenNode::Op(ch, kind)
        | ^^^^^^^^^ Could not find `TokenNode` in `pr oc_macro`

        error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
        --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/s rc/unstable.rs:74:33
        |
        74 | proc_macro::TokenNode::Term((s.0).0)
        | ^^^^^^^^^ Could not find `TokenNode` in `pr oc_macro`

        error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
        --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/s rc/unstable.rs:77:33
        |
        77 | proc_macro::TokenNode::Literal((l.0).0)
        | ^^^^^^^^^ Could not find `TokenNode` in `pr oc_macro`

        error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
        --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/ src/unstable.rs:125:29
        |
        125 | proc_macro::TokenNode::Group(delim, s) => {
        | ^^^^^^^^^ Could not find `TokenNode` in `proc_ macro`

        error[E0433]: failed to resolve. Could not find `TokenNode` in `proc_macro`
        --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.1.10/ src/unstable.rs:134:29
        到编译安装那一步的时候就一直这样报错,不知道为啥

        2018年5月6日
        • Joker

          @lemon粟 git clone最新源码试试

          2018年5月6日
          • lemon粟

            @Joker 额,什么意思?我看GitHub上有1.4.3了,是把版本号改一下再装吗?我试了一下,编译安装还是不成功,没有这么多报错,但和你教程上的还是不一样

            2018年5月6日
          • Joker

            @lemon粟 我明后天抽空改一下教程的安装方式。

            2018年5月6日
          • Joker

            @lemon粟 已更新安装方式。

            2018年5月7日
  • masha

    请问centos 7 apt命令没法用怎么办啊

    2018年5月8日
    • Joker

      @masha 把前面的apt-get改成yum即可。

      2018年5月8日
      • masha

        @Joker 哦哦,好的,我试试

        2018年5月8日
  • masha

    Current installation options:

    default host triple: x86_64-unknown-linux-gnu
    default toolchain: nightly
    modify PATH variable: yes

    1) Proceed with installation (default)
    2) Customize installation
    3) Cancel installation
    你好,到这里就不动了。。。

    2018年5月8日
    • Joker

      @masha 让你选择安装模式啊,你选1就行了。

      2018年5月8日
      • masha

        @Joker 说没有rssbot-1.4.2: No such file or directory 文件呢

        2018年5月8日
        • Joker

          @masha 你应该ls看一下你的文件夹名称,如果你是git clone下来的,那么文件夹应该就是rssbot,所以你直接cd rssbot就行了。

          2018年5月8日
  • masha

    info: default toolchain set to 'nightly'

    nightly installed - rustc 1.27.0-nightly (565235ee7 2018-05-07)

    Rust is installed now. Great!

    To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
    environment variable. Next time you log in this will be done automatically.

    To configure your current shell run source $HOME/.cargo/env
    [root@zbwujie ~]# source $HOME/.cargo/env
    [root@zbwujie ~]# cd rssbot-1.4.2
    -bash: cd: rssbot-1.4.2: No such file or directory
    [root@zbwujie ~]# cd rssbot-1.4.2
    -bash: cd: rssbot-1.4.2: No such file or directory
    [root@zbwujie ~]#

    2018年5月8日
    • Joker

      @masha 你直接cd rssbot

      2018年5月8日
  • masha

    error: linker `cc` not found
    |
    = note: No such file or directory (os error 2)

    error: aborting due to previous error

    error: Could not compile `regex`.

    To learn more, run the command again with --verbose.

    又来麻烦您了。。。。有几处报错,,

    2018年5月8日
    • Joker

      @masha 安装gcc,yum -y install gcc

      2018年5月8日
      • masha

        @Joker 安装完了之后还需要再运行编译吗

        2018年5月8日
        • Joker

          @masha 是的,安装完gcc之后,再次编译即可。

          2018年5月8日
  • masha

    error: failed to run custom build command for `openssl-sys v0.9.30`
    process didn't exit successfully: `/root/rssbot/target/release/build/openssl-sys-8a5cce3b74681ee9/build-script-build` (exit code: 101)
    --- stdout
    cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
    cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
    cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
    cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
    cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
    cargo:rerun-if-env-changed=OPENSSL_DIR
    run pkg_config fail: "`\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"` did not exit successfully: exit code: 1\n--- stderr\nPackage openssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openssl.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'openssl\' found\n"

    --- stderr
    thread 'main' panicked at '

    Could not find directory of OpenSSL installation, and this `-sys` crate cannot
    proceed without this knowledge. If OpenSSL is installed and this crate had
    trouble finding it, you can set the `OPENSSL_DIR` environment variable for the
    compilation process.

    Make sure you also have the development packages of openssl installed.
    For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

    If you're in a situation where you think the directory *should* be found
    automatically, please open a bug at https://github.com/sfackler/rust-openssl
    and include information about your system as well as this message.

    $HOST = x86_64-unknown-linux-gnu
    $TARGET = x86_64-unknown-linux-gnu
    openssl-sys = 0.9.30

    ', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.30/build.rs:212:5
    note: Run with `RUST_BACKTRACE=1` for a backtrace.
    。。。。。我觉得我这个系统是不是特别纯净啊,又报错了。。

    2018年5月8日
    • Joker

      @masha 感觉你这个是依赖没装完,你自行检查吧!

      2018年5月8日
      • masha

        @Joker 额好吧,谢谢了。。。

        2018年5月8日
  • lemon粟

    [root@lemon1 rssbot]# cd target/release
    [root@lemon1 release]# ./rssbot DATAFILE TELEGRAM-BOT-TOKEN
    thread 'main' panicked at 'failed to initialize bot: Telegram(404, "Not Found", None)', libcore/result.rs:945:5
    note: Run with `RUST_BACKTRACE=1` for a backtrace.
    前边一切正常,最后一步运行的时候又报错 :lol: :lol: :lol:

    2018年5月9日
    • Joker

      @lemon粟 token改成自己的bot的token

      2018年5月9日
      • lemon粟

        @Joker 嗯嗯,这个我懂了,就是那个要一直运行的话改成screen是什么意思?现在的安装完成后不是一直在后台运行吗?

        2018年5月9日
        • Joker

          @lemon粟 你需要去了解一下screen的操作,因为rssbot运行中,你如果关闭ssh,rssbot会自动关闭的呀,所以你要在后台运行才可以。

          2018年5月9日
  • stefu

    编译安装报了一堆错。。

    error: aborting due to 6 previous errors

    Some errors occurred: E0412, E0433, E0599.
    For more information about an error, try `rustc --explain E0412`.
    error: Could not compile `proc-macro2`.

    To learn more, run the command again with --verbose.

    2018年5月18日
    • Joker

      @stefu 安装环境、配置说一下,另外,你看看,这是发生了6个错误,你要看看到底是出错在哪里。

      2018年5月18日
      • stefu

        @Joker 不用了,我直接用了从github那边releases下载的预编译文件,已经可以运行了,谢谢。对Linux了解不深,每次照着教程装东西都心惊胆战的,一报错就得满世界搜方法,还经常没用,太痛苦了。。

        2018年5月18日
  • pfttm

    cargo build --release报错(ubuntu):
    error[E0433]: failed to resolve. Could not find `Op` in `proc_macro`
    --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:131:42
    |
    131 | let mut op = proc_macro::Op::new(tt.op(), spacing);
    | ^^ Could not find `Op` in `proc_macro`

    error[E0433]: failed to resolve. Could not find `Term` in `proc_macro`
    --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:446:59
    |
    446 | Span::Nightly(s) => Term::Nightly(proc_macro::Term::new(string, s)),
    | ^^^^ Could not find `Term` in `proc_macro`

    error[E0412]: cannot find type `Term` in module `proc_macro`
    --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:439:25
    |
    439 | Nightly(proc_macro::Term),
    | ^^^^ not found in `proc_macro`
    help: possible candidates are found in other modules, you can import them into scope
    |
    3 | use Term;
    |
    3 | use imp::Term;
    |
    3 | use stable::Term;
    |

    error[E0412]: cannot find type `Term` in module `proc_macro`
    --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:473:44
    |
    473 | fn unwrap_nightly(self) -> proc_macro::Term {
    | ^^^^ not found in `proc_macro`
    help: possible candidates are found in other modules, you can import them into scope
    |
    3 | use Term;
    |
    3 | use imp::Term;
    |
    3 | use stable::Term;
    |

    error[E0599]: no variant named `Op` found for type `proc_macro::TokenTree` in the current scope
    --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:228:13
    |
    228 | proc_macro::TokenTree::Op(tt) => {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ variant not found in `proc_macro::TokenTree`

    error[E0599]: no variant named `Term` found for type `proc_macro::TokenTree` in the current scope
    --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.3.8/src/unstable.rs:237:13
    |
    237 | proc_macro::TokenTree::Term(s) => ::Term::_new(Term::Nightly(s)).into(),
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ variant not found in `proc_macro::TokenTree`

    error: aborting due to 6 previous errors

    Some errors occurred: E0412, E0433, E0599.
    For more information about an error, try `rustc --explain E0412`.
    error: Could not compile `proc-macro2`.

    To learn more, run the command again with --verbose.

    2018年5月19日
    • Joker

      @pfttm 去下载预编译包解压使用

      2018年5月19日
      • pfttm

        @Joker curl -s https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly
        然后
        cd rssbot-1.4.3 #进入目录
        cargo build --release #编译安装
        还是一样的错误,请指教

        2018年5月19日
      • pfttm

        @Joker 理解您的意思了,直接下载zip包解压?能帮忙解决下编译失败的问题吗?想解决。。

        2018年5月19日
        • Joker

          @pfttm 你应该用预编译包,就不会出错了呀

          2018年5月20日
  • 德里克

    [root@shiyan rssbot]# cargo build --release
    -bash: cargo: command not found
    [root@shiyan rssbot]#
    这是为啥啊,求解

    2018年5月22日
    • Joker

      @德里克 看教程的2.3步骤

      2018年5月22日
  • lbroot

    已测试debisn9.centos7都报错,求救!
    error[E0599]: no function or associated item named `empty` found for type `proc_macro::TokenStream` in the current scope
    --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-0.4.3/src/unstable.rs:45:34
    |
    45 | TokenStream::Nightly(proc_macro::TokenStream::empty())
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `proc_macro::TokenStream`

    error: aborting due to previous error

    For more information about this error, try `rustc --explain E0599`.
    error: Could not compile `proc-macro2`.
    warning: build failed, waiting for other jobs to finish...
    error: build failed

    2018年6月3日
  • 林木木

    感谢,已使用

    2018年7月31日
  • Simon

    error: linking with `cc` failed: exit code: 1
    |
    = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot0-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot1-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot10-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot11-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot12-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot13-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot14-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot15-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot2-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot3-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot4-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot5-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot6-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot7-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot8-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "/rssbot/target/release/deps/rssbot-4728af67330def22.rssbot9-8c606bf78986ace5fcebf7d2484ba88d.rs.rcgu.o" "-o" "/rssbot/target/release/deps/rssbot-4728af67330def22" "/rssbot/target/release/deps/rssbot-4728af67330def22.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/rssbot/target/release/deps" "-L" "/rssbot/target/release/build/curl-sys-6cc86ef972cd0a7f/out/lib" "-L" "/rssbot/target/release/build/backtrace-sys-c0eda09e4b8bc388/out" "-L" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/rssbot/target/release/deps/libpinyin_order-cc30c6952be60cdc.rlib" "/rssbot/target/release/deps/libphf-122952658dd6d268.rlib" "/rssbot/target/release/deps/libphf_shared-ebff82abdd81f226.rlib" "/rssbot/target/release/deps/libsiphasher-bdcddc26a644d737.rlib" "/rssbot/target/release/deps/libchrono-a50c7267400c5028.rlib" "/rssbot/target/release/deps/libnum_integer-79ec82f4d9cf7736.rlib" "/rssbot/target/release/deps/libnum_traits-2ce73009dd5c0e41.rlib" "/rssbot/target/release/deps/libtime-50e3ee59e7254ec9.rlib" "/rssbot/target/release/deps/liblazy_static-5e8a9a7dd76969c5.rlib" "/rssbot/target/release/deps/libtelebot-33ccbe2bb6723f3d.rlib" "/rssbot/target/release/deps/libtokio_curl-ad0f68f024047afb.rlib" "/rssbot/target/release/deps/libtokio_core-2938a8b1c6b19691.rlib" "/rssbot/target/release/deps/libscoped_tls-295646541aaa9a79.rlib" "/rssbot/target/release/deps/libtokio-4afef91d1ae7f907.rlib" "/rssbot/target/release/deps/libtokio_udp-b7a2873f36856113.rlib" "/rssbot/target/release/deps/libtokio_codec-c581f84b2191f307.rlib" "/rssbot/target/release/deps/libtokio_tcp-6a766df4ca70973f.rlib" "/rssbot/target/release/deps/libtokio_timer-a1e19e815ba93898.rlib" "/rssbot/target/release/deps/libtokio_reactor-9362e559e8db9f07.rlib" "/rssbot/target/release/deps/libtokio_fs-b6fa79791c79571c.rlib" "/rssbot/target/release/deps/libtokio_threadpool-9b7345e771566e84.rlib" "/rssbot/target/release/deps/librand-2d79d427b0857fd3.rlib" "/rssbot/target/release/deps/libnum_cpus-1e97067500a5b3ae.rlib" "/rssbot/target/release/deps/libcrossbeam_deque-42ad475daa7eb448.rlib" "/rssbot/target/release/deps/libcrossbeam_epoch-135369014e7e2236.rlib" "/rssbot/target/release/deps/libscopeguard-dbf79d67f8b129aa.rlib" "/rssbot/target/release/deps/libmemoffset-f8d28e70088e74ec.rlib" "/rssbot/target/release/deps/libcrossbeam_utils-c9a4f3cacd966878.rlib" "/rssbot/target/release/deps/libarrayvec-39dbd3e628676b2c.rlib" "/rssbot/target/release/deps/libnodrop-efd46c54cd1acea6.rlib" "/rssbot/target/release/deps/libtokio_executor-702a80038fd42d77.rlib" "/rssbot/target/release/deps/libtokio_io-850d7c295721a5bc.rlib" "/rssbot/target/release/deps/libmio-0625da45381fa714.rlib" "/rssbot/target/release/deps/libslab-4e90ec98f39ab0d9.rlib" "/rssbot/target/release/deps/libnet2-192f204bf268dce7.rlib" "/rssbot/target/release/deps/liblazycell-028d2cd629439f87.rlib" "/rssbot/target/release/deps/libbytes-f80528111e359de3.rlib" "/rssbot/target/release/deps/libiovec-8534518edb825cd8.rlib" "/rssbot/target/release/deps/libbyteorder-ef8f09ae89a6a75d.rlib" "/rssbot/target/release/deps/libquick_xml-fe0e6eb8a0f6a053.rlib" "/rssbot/target/release/deps/libmemchr-96885f581b59a559.rlib" "/rssbot/target/release/deps/libencoding_rs-b4c3821c72f3a810.rlib" "/rssbot/target/release/deps/libfutures_await-b8cf143d9cc921d7.rlib" "/rssbot/target/release/deps/libfutures-75681e826ab2ac4e.rlib" "/rssbot/target/release/deps/libfutures_await_await_macro-cdff6a1b39bd7528.rlib" "/rssbot/target/release/deps/libcurl-9722b28843c328c0.rlib" "/rssbot/target/release/deps/libopenssl_probe-a182e103891c0f24.rlib" "/rssbot/target/release/deps/libsocket2-5f11d3c49fe1a59a.rlib" "/rssbot/target/release/deps/libcurl_sys-87c84b8187fa898c.rlib" "/rssbot/target/release/deps/libopenssl_sys-a294d02bc7a746df.rlib" "/rssbot/target/release/deps/liblibz_sys-d3ba77928e83848c.rlib" "/rssbot/target/release/deps/libserde_json-624629b2544f8eb2.rlib" "/rssbot/target/release/deps/libitoa-f568e2108eb992c0.rlib" "/rssbot/target/release/deps/libdtoa-27e291c12393ba16.rlib" "/rssbot/target/release/deps/libserde-8ab2883e6fdf56bb.rlib" "/rssbot/target/release/deps/liberror_chain-dd91e444462c260c.rlib" "/rssbot/target/release/deps/libbacktrace-2f77a123dcde5d90.rlib" "/rssbot/target/release/deps/libbacktrace_sys-4822be7bbf22c492.rlib" "/rssbot/target/release/deps/librustc_demangle-7e1b463fda47e6fc.rlib" "/rssbot/target/release/deps/libenv_logger-c89802cfe63c5c54.rlib" "/rssbot/target/release/deps/libregex-1b9ad3d517bd98e6.rlib" "/rssbot/target/release/deps/libutf8_ranges-1033582635c2693c.rlib" "/rssbot/target/release/deps/libregex_syntax-ab4e574579212fa7.rlib" "/rssbot/target/release/deps/libucd_util-dd39a887ac1326ab.rlib" "/rssbot/target/release/deps/libthread_local-f653cdac9c31ebe4.rlib" "/rssbot/target/release/deps/liblazy_static-17431c914c3b6a2c.rlib" "/rssbot/target/release/deps/libunreachable-66ff56d26adc16cc.rlib" "/rssbot/target/release/deps/libvoid-8c19ae2460837472.rlib" "/rssbot/target/release/deps/libaho_corasick-588e5a6436b0f2fe.rlib" "/rssbot/target/release/deps/libmemchr-4bcb6f221dca4d8e.rlib" "/rssbot/target/release/deps/liblibc-15432fd6bf310fd1.rlib" "/rssbot/target/release/deps/liblog-110a9467cd6f3de2.rlib" "/rssbot/target/release/deps/liblog-bf26c237a5f2aff4.rlib" "/rssbot/target/release/deps/libcfg_if-7dfe375c3256d236.rlib" "-Wl,--start-group" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-b4c8dbf9184f1eab.rlib" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-c4835deb77157644.rlib" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-1853a012adab0b04.rlib" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-f63004e20d46ccee.rlib" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-da12c3164f2ac12e.rlib" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-3ff4f21f592c989a.rlib" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-d2bce5a867e060e0.rlib" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-df1c4191c1ed4f51.rlib" "-Wl,--end-group" "/root/.rustup/toolchains/nightly-2018-06-13-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-2de2574d9a395872.rlib" "-Wl,-Bdynamic" "-l" "ssl" "-l" "crypto" "-l" "z" "-l" "util" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util"
    = note: /usr/bin/ld: cannot find -lz
    collect2: error: ld returned 1 exit status

    error: aborting due to previous error

    error: Could not compile `rssbot`.

    To learn more, run the command again with --verbose.

    这样的错误怎么解决呢大佬。

    2019年10月19日
    • Joker

      @Simon 不要用源代码编译,直接下载二进制文件运行就行了

      2019年10月24日