Getting “Existing lock /var/run/yum.pid: another copy is running as pid …” during bootstraping in EMR

二次信任 提交于 2019-12-12 03:07:21

问题


I need to install python3 in my EMR cluster (AMI 3.1.1) as a part of bootstraping step. So I added the following command:

sudo yum install -y python3

But everytime I got an error saying the following:

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

How can I avoid this error? Or is there a way to install Python 3 without going through this route?


回答1:


The issue is that the Amazon Linux AMI is performing a yum update as part of boot. A bootstrap action can collide with it as seen here. Just add a sleep for a couple minutes before the yum install.




回答2:


I ended up installing from the source code:

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



回答3:


Try with

 sudo apt-get install -y python3


来源:https://stackoverflow.com/questions/27738179/getting-existing-lock-var-run-yum-pid-another-copy-is-running-as-pid-dur

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!