【发布时间】:2012-07-03 03:11:15
【问题描述】:
我正在运行 Redhat VM(2.6.18-274.el5 64 位)。我在 vm 上安装了 nodejs 以使用 browserstack。为了让 nodejs 运行,我必须将 Python 升级到 2.6 或更高版本。我使用 make altinstall 从源代码安装了 2.7。然后我创建了一个从 2.4 指向 2.7 的硬链接。检查 python -V 现在显示 2.7 是默认值。一切正常,节点现已启动并运行。
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.7.2 (default, Jul 2 2012, 23:35:52)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
我的问题是百胜。它不再工作,因为它正在寻找 2.4 的旧版本 Python?无论如何,我可以让它们都像在 Yum 和 node 中一样使用不同的版本吗?
【问题讨论】:
-
你不应该尝试在redhat机器上替换系统python。相反,您可以在例如 /usr/local 中安装更新的 python,并将其用于需要它的脚本。
标签: python linux node.js redhat