Centos Mosh 服务器端 安装笔记 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
simonliu
V2EX    问与答

Centos Mosh 服务器端 安装笔记

  •  
  •   simonliu 2016-10-14 18:09:49 +08:00 4323 次点击
    这是一个创建于 3366 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Mosh 是个好东西,能长时间保持 SSH 的连接不断掉。 今天折腾了一个韩国的 vps ( centos 6 ),可以免费试用一个月。它的源无法直接安装 mosh ,于是折腾了一下,做个笔记。

    cd /usr/local/data wget https://mosh.org/mosh-1.2.6.tar.gz tar -zxvf mosh-1.2.6.tar.gz cd mosh-1.2.6 ./config make make install 

    中间遇到几个问题

    configure: error: in `/usr/local/data/mosh-1.2.6': configure: error: no acceptable C compiler found in $PATH 

    这个通过安装 gcc 解决

    yum install gcc 
    checking for protoc... no configure: error: cannot find protoc, the Protocol Buffers compiler 

    尝试

    yum install -y protobuf-devel 已加载插件: fastestmirror 设置安装进程 Loading mirror speeds from cached hostfile * base: ftp.daumkakao.com * extras: ftp.daumkakao.com * updates: ftp.daumkakao.com No package protobuf-devel available. 

    好吧

    cd.. git clone https://github.com/google/protobuf.git cd protobuf ./autogen.sh 

    然后提示

    ./autogen.sh: line 35: unzip: command not found 

    只好

    yum -y install unzip 

    然后再次运行 autogen.sh

     autoreconf -f -i -Wall,no-obsolete ./autogen.sh: line 48: autoreconf: command not found 

    需要

    yum -y install autoconf 

    然后还是

    Can't exec "automake": 没有那个文件或目录 at /usr/bin/autoreconf line 242. Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 242. Can't exec "aclocal": 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 326. autoreconf: failed to run aclocal: 没有那个文件或目录 

    于是

    yum -y install automake autoconf 

    但是还

    + autoreconf -f -i -Wall,no-obsolete configure.ac:30: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/bin/autoconf failed with exit status: 1 

    我晕了,继续搜索,找到解决方案

    yum install -y libtool libsysfs-dev 

    这下./autogen.sh 不报错了,但是./configure 报如下错误

    configure: error: in `/usr/local/data/protobuf': configure: error: C++ preprocessor "/lib/cpp" fails sanity check See `config.log' for more details. 

    于是

    yum -y install glibc-headers gcc-c++ 

    然后下面三个命令就都顺利了

    ./configure make make install 

    回到 mosh-1.2.6 目录下./configure 遇到问题:

    configure: error: Unable to find zlib. 

    于是

    yum install zlib-devel 

    但是再次 configure 又有

    configure: error: OpenSSL crypto library not found 
    yum install -y openssl-devel 

    不过还是又有错误

    checking for protobuf... no configure: error: Package requirements (protobuf) were not met: No package 'protobuf' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables protobuf_CFLAGS and protobuf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. 

    解决办法,重新编译 protobuf

    cd ../protobuf ./configure prefix=/usr libdir=/usr/lib64 make clean make && make install 

    然后回到 mosh-1.2.6 目录下

    ./configure make && make install 
    2 条回复    2017-03-30 17:07:36 +08:00
    sjqlwy
        1
    sjqlwy  
       2016-11-23 22:22:01 +08:00
    非常感谢!
    DevilHunterXX
        2
    DevilHunterXX  
       2017-03-30 17:07:36 +08:00
    遇到了同样的问题,同样的坑,感谢楼主的笔记帮助脱坑!

    整理如下:
    yum -y install unzip gcc automake autoconf libtool libsysfs-dev glibc-headers gcc-c++ zlib-devel openssl-devel

    git clone https://github.com/google/protobuf.git
    cd protobuf
    ./autogen.sh
    ./configure --prefix=/usr --libdir=/usr/lib64
    make clean
    make && make install


    git clone https://github.com/mobile-shell/mosh
    cd mosh
    ./autogen.sh
    ./configure
    make
    make install
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1989 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 23ms UTC 00:35 PVG 08:35 LAX 16:35 JFK 19:35
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86