在EMR引导期间获取“现有锁定/var/run/yum.pid:另一个副本作为pid运行...”

问题描述 投票:0回答:3

作为bootstraping步骤的一部分,我需要在我的EMR集群(AMI 3.1.1)中安装python3。所以我添加了以下命令:

sudo yum install -y python3

但每次我收到错误说下面的内容:

Existing lock /var/run/yum.pid: another copy is running as pid 1829.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum

我怎样才能避免这个错误?或者有没有办法安装Python 3而不经过这条路线?

yum emr amazon-emr
3个回答
3
投票

问题是Amazon Linux AMI正在执行yum更新作为启动的一部分。引导操作可能会与此冲突,如此处所示。只需在安装yum之前添加睡眠几分钟。


1
投票

我最终从源代码安装:

wget --no-check-certificate -O Python-3.4.2.tgz "https://www.python.org/ftp/python/3.4.2/Python-3.4.2.tgz"
tar xvfz Python-3.4.2.tgz
cd Python-3.4.2
./configure
make
sudo make altinstall

-1
投票

试试吧

 sudo apt-get install -y python3
© www.soinside.com 2019 - 2024. All rights reserved.