-4

I've been having issues with ssh connections terminating, and thought it might be better to install mosh on the emr master - this way there would be some protection from loss of connectivity. I've created the following script to act as part of my bootstrap, but when I run it, I'm having a few issues.

#!/bin/bash

#
# Make sure we've got git, autoconf, automake, protobuf-compilers
#

sudo yum install -y \
    git \
    autoconf-2.69-11.9.amzn1.noarch \
    automake-1.13.4-3.15.amzn1.noarch \
    protobuf-compiler-2.5.0-1.8.amzn1.x86_64 \
    protobuf-2.5.0-1.8.amzn1.x86_64

#
# Pull the latest code from github
#

cd /home/hadoop
git clone https://github.com/keithw/mosh

#
# Build and install
#

cd mosh
./autogen.sh && ./configure && make && sudo make install

Currently this falls over on the configure step with the following:

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.

I've tried setting PREFIX=/usr and PKG_CONFIG_PATH=${PREFIX}/lib64/pkgconfig, then running ./configure with --prefix=$PREFIX - that doesn't help, I've also tried installing the 32 bit package, which also didn't help. This would all be easier if there were a source for sudo yum install -y mosh, however yum whatprovides mosh comes back empty.

Any pointers would be welcome!

4

1 回答 1

4

这取决于您安装的 AMI 版本。您需要进行一些更改才能在 AMI 3.7.0 上构建它:

  • 不要指定特定版本的 protobuf 包。

    新 AMI 上有 protobuf 版本 2.5.0-1.10

  • 另外安装包protobuf-devel

所以你的yum install命令应该是这样的:

sudo yum install -y \
  git \
  autoconf-2.69-11.9.amzn1.noarch \
  automake-1.13.4-3.15.amzn1.noarch \
  protobuf-compiler \
  protobuf \
  protobuf-devel

升级版:

不要忘记修改您的 ElasticMapReduce-master 安全组以打开 UDP 端口 60001。

  • 转到 AWS EC2 WebConsole / Network & Security / Security Groups;
  • 从列表中选择一个ElasticMapReduce-master安全组;
  • 转到Inbound选项卡,然后为 UDP 端口 6001 设置新规则。
于 2015-06-08T23:15:13.380 回答