2016-08-12 13 views
-1

新しく作成したEC2インスタンス(Ubuntu 14.04)にCodeDeployエージェントをインストールすると、Install or Reinstall the AWS CodeDeploy Agentガイドの手順に従って、rpmのエラーが発生しました。AWS EC2にCodeDeploy Agentをインストールする際にエラーが発生しました

コマンド:

wget https://aws-codedeploy-us-west-2.s3.amazonaws.com/latest/install 

chmod +x ./install 

sudo ./install auto 

エラー:

sudo: unable to resolve host ip-10-0-88-56 
I, [2016-08-12T01:22:00.600236 #30533] INFO -- : Starting Ruby version check. 
I, [2016-08-12T01:22:00.600470 #30533] INFO -- : Starting update check. 
I, [2016-08-12T01:22:00.600565 #30533] INFO -- : Checking AWS_REGION environment variable for region information... 
I, [2016-08-12T01:22:00.600645 #30533] INFO -- : Checking EC2 metadata service for region information... 
I, [2016-08-12T01:22:00.627237 #30533] INFO -- : Downloading version file from bucket aws-codedeploy-us-west-2 and key latest/VERSION... 
I, [2016-08-12T01:22:00.666351 #30533] INFO -- : Downloading version file from bucket aws-codedeploy-us-west-2 and key latest/VERSION... 
I, [2016-08-12T01:22:00.695690 #30533] INFO -- : Downloading package from bucket aws-codedeploy-us-west-2 and key releases/codedeploy-agent-1.0-1.1011.noarch.rpm... 
I, [2016-08-12T01:22:00.756074 #30533] INFO -- : Executing `/usr/bin/yum -y localinstall /tmp/codedeploy-agent-1.0-1.1011.noarch.tmp-20160812-30533-1j5n6zs.rpm`... 
Setting up Local Package Process 
Examining /tmp/codedeploy-agent-1.0-1.1011.noarch.tmp-20160812-30533-1j5n6zs.rpm: codedeploy-agent-1.0-1.1011.noarch 
Marking /tmp/codedeploy-agent-1.0-1.1011.noarch.tmp-20160812-30533-1j5n6zs.rpm to be installed 
Resolving Dependencies 
--> Running transaction check 
---> Package codedeploy-agent.noarch 0:1.0-1.1011 will be installed 
--> Processing Dependency: /bin/sh for package: codedeploy-agent-1.0-1.1011.noarch 
--> Processing Dependency: /bin/sh for package: codedeploy-agent-1.0-1.1011.noarch 
--> Processing Dependency: /bin/sh for package: codedeploy-agent-1.0-1.1011.noarch 
--> Processing Dependency: /bin/sh for package: codedeploy-agent-1.0-1.1011.noarch 
--> Processing Dependency: /bin/sh for package: codedeploy-agent-1.0-1.1011.noarch 
--> Processing Dependency: /bin/sh for package: codedeploy-agent-1.0-1.1011.noarch 
--> Finished Dependency Resolution 
Error: Package: codedeploy-agent-1.0-1.1011.noarch (/codedeploy-agent-1.0-1.1011.noarch.tmp-20160812-30533-1j5n6zs) 
      Requires: /bin/sh 
You could try using --skip-broken to work around the problem 
You could try running: rpm -Va --nofiles --nodigest 
E, [2016-08-12T01:22:00.847217 #30533] ERROR -- : Error installing /tmp/codedeploy-agent-1.0-1.1011.noarch.tmp-20160812-30533-1j5n6zs.rpm. 

が、私はそれを確認しました:

  • /bin/shが存在しない
  • Ruby 2.3.0がRVM経由でインストールされました

私はDevOpsを初めて利用していますので、ここからどこに行くのか分かりません。どんな助けや方向性も大いにありがとう!

答えて

0

私は、主な問題は、ホスト名の誤りであると考えている:私はこの問題を持っていた

sudo: unable to resolve host ip-10-0-88-56 

。何らかの初期化エラーのように見えます。私は新しいAMI打ち上げでもう一度試してみて、それ自体解決しました。

ちょうど問題を特定するために、これを試してみてください。
echo "127.0.0.1 $(hostname)" >> /etc/hosts 

が続いてセットアップスクリプトを再試行してください。

参考までに、私はCodeDeployをUbuntu 14.04にインストールするのと同じ手順を使用します。手順は正しいです。

wget https://aws-codedeploy-${EC2_REGION}.s3.amazonaws.com/latest/install 
chmod +x ./install 
sudo ./install auto 
sudo service codedeploy-agent status 
関連する問題