AWS Spot 实例引导失败:软件包 amazon-ssm-agent 已安装

jmu*_*ire 5 cloud amazon-web-services aws-devops

我有一个必须在 bootstrap 上安装 docker 的安装点实例。最近,我在依赖项下载阶段遇到了一个新问题。

下载事务失败,如下所示:

Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
--------------------------------------------------------------------------------
Total                                               78 MB/s | 131 MB  00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Transaction couldn't start:
package amazon-ssm-agent-3.1.1080.0-1.x86_64 (which is newer than amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64) is already installed
file /etc/amazon/ssm/README.md from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64
file /etc/amazon/ssm/NOTICE.md from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64
file /etc/amazon/ssm/RELEASENOTES.md from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64
file /etc/amazon/ssm/amazon-ssm-agent.json.template from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64
file /usr/bin/amazon-ssm-agent from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64
file /usr/bin/ssm-agent-worker from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64
file /usr/bin/ssm-cli from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64
file /usr/bin/ssm-document-worker from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64
file /usr/bin/ssm-session-logger from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64
file /usr/bin/ssm-session-worker from install of amazon-ssm-agent-3.0.1124.0-1.amzn2.x86_64 conflicts with file from package amazon-ssm-agent-3.1.1080.0-1.x86_64

...

Redirecting to /bin/systemctl start docker.service
Failed to start docker.service: Unit not found.
Run Code Online (Sandbox Code Playgroud)

显然,由于 amazon-ssm-agent 的两个版本之间存在冲突,交易失败!由于此错误,其他依赖项的安装被中止。

是否可以修复一个版本或避免安装新版本的 SSM?

jmu*_*ire 0

@Riz 在评论中提供的解决方案解决了这个问题。

我必须在 bootstrap 上删除 ssm :

sudo yum erase amazon-ssm-agent --assumeye && sudo yum update -y
sudo yum install -y docker && sudo service docker start
Run Code Online (Sandbox Code Playgroud)