根据yum在centos.org中的文档,任何包都可以使用yum search命令在所有存储库中找到。
yum此命令用于在所有存储库中RPM的描述、汇总、打包程序和包名字段中查找包含指定关键字的任何包。
但是,我找不到这个命令的最新Python 3版本。我能知道为什么吗?
[root@CentOS7 centos]# yum search python | grep 3
python-backports-lzma.x86_64 : Backport of Python 3.3's lzma module
: from Python 3
python-enum34.noarch : Backport of Python 3.4 Enum
python-gssapi.x86_64 : Python Bindings for GSSAPI (RFC 2743/2744 and extensions)
python-ipaddress.noarch : Port of the python 3.3+ ipaddress module to 2.6+
python-six.noarch : Python 2 and 3 compatibility utilities
python-urllib3.noarch : Python HTTP library with thread-safe connection pooling
python-zope-interface.x86_64 : Zope 3 Interface Infrastructure
[root@CentOS7 centos]# 第二,Python2.7.5目前在这个操作系统中可用,我也想安装最新的Python 3。
[root@CentOS7 centos]# python -V
Python 2.7.5
[root@CentOS7 centos]# 为什么我不能用yum install命令做到这一点呢?
用于安装软件包或软件包组的最新版本的yum安装。如果没有任何包与指定的包名(S)匹配,则假设它们是shell glob,然后安装任何匹配项。
[root@CentOS7 centos]# yum install python3
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.usonyx.net
* extras: centos.usonyx.net
* updates: centos.usonyx.net
No package python3 available.
Error: Nothing to do
[root@CentOS7 centos]#
[root@CentOS7 centos]# yum install python-3
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.usonyx.net
* extras: centos.usonyx.net
* updates: centos.usonyx.net
No package python-3 available.
Error: Nothing to do
[root@CentOS7 centos]# https://www.centos.org/docs/5/html/5.1/Deployment_指南/s1-yum-有用-Commands.html
发布于 2017-11-03 12:25:19
在RHEL存储库中没有官方的Pythonv3.x。RHEL 7基于Python2.7。
然而,RH通过RH软件集合提供了一些软件包的更新版本:
https://access.redhat.com/support/policy/updates/rhscl
有Python3.3和3.4。
对于CentOS,您应该能够使用SCL:
https://unix.stackexchange.com/questions/402285
复制相似问题