我需要在我的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而不经过这条路线?
答案 0 :(得分:3)
问题是Amazon Linux AMI正在执行yum更新作为启动的一部分。引导操作可能会与此冲突,如此处所示。只需在安装yum之前添加睡眠几分钟。
答案 1 :(得分: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
答案 2 :(得分:-1)
尝试
sudo apt-get install -y python3