Debian/Ubuntu 编译安装 mosh

Dec 04, 2019

黑五入了一台Virmach的Buffalo闪购机,性价比很高,就是服务器在美国东岸,离大陆太远,延迟太高。10Gbps口宽带,套上cloudflare后速度不错,不过用ssh敲命令实在很卡,于是编译安装mosh来替代ssh。Mosh建立的远程连接是基于UDP传输的,这样在TCP超时时仍会保持连接,对延迟较高的服务器提升效果明显。 根据官网的步骤:

$ git clone https://github.com/mobile-shell/mosh
$ cd mosh
$ ./autogen.sh
$ ./configure
$ make
# make install

中间遇到几个报错和对应的解决方式如下:

./autogen.sh: line 3: exec: autoreconf: not found

apt install autoconf

configure: error: cannot find protoc, the Protocol Buffers compiler

apt install protobuf-compiler

configure: error: requires either tinfo, NcursesW or Ncurses library

apt install libncurses-dev

configure: error: OpenSSL crypto library not found

apt install libssl-dev
configure: error: The pkg-config script could not be found or is too old.  Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config.

Alternatively, you may set the environment variables protobuf_CFLAGSand protobuf_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See 'config.log' for more details
apt install pkg-config
Linux

将Typecho内存化,突破I/O限制

自制一言API全指南