Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
安装时出现Python版本错误_Python_Amazon Web Services_Yum - Fatal编程技术网

安装时出现Python版本错误

安装时出现Python版本错误,python,amazon-web-services,yum,Python,Amazon Web Services,Yum,当我执行yum时, 上面说 我的aws实例详细信息如下所示: Linux ip-72-311-15-127 3.14.27-25.47.amzn1.x86_64 #1 SMP Wed Dec 17 18:36:15 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux /usr/bin/apt get也不可用 /usr/bin/yum在那里,所以我试了一下 /usr/bin/yum install -u mongodb-org 给 bash: /usr/bin/yu

当我执行
yum
时, 上面说

我的aws实例详细信息如下所示:

Linux ip-72-311-15-127 3.14.27-25.47.amzn1.x86_64 #1 SMP Wed Dec 17 18:36:15 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
/usr/bin/apt get
也不可用

/usr/bin/yum
在那里,所以我试了一下

/usr/bin/yum install -u mongodb-org

bash: /usr/bin/yum: /usr/bin/python2.62.7: bad interpreter: No such file or directory

对此有什么建议吗?

我想yum依赖于python,但您的系统没有

尝试重新安装yum

$rpm-V yum

如果无法解决问题,请尝试使用rpm安装python


顺便说一句,现在您可能想要python 2.7而不是2.6…

首先,您应该找到python可执行文件的位置

which python
这将为您提供一个类似于
/usr/bin/python
的路径

然后您可以创建指向它的链接

sudo ln -s /usr/bin/python /usr/bin/python2.62.7
sudo ln -s /usr/bin/python /usr/bin/python2.62.7