centos7下安装 python3

https://www.cnblogs.com/simuhunluo/p/7704765.html

在centos中安装python3的时要编译安装包的时候提示没有C complier

用如下方式安装

[root@sin02 /]# yum install gcc

Loaded plugins: fastestmirrorLoading mirror speeds from cached hostfile * base: mirror.0x.sg * epel: mirror.horizon.vn * extras: mirror.0x.sg * updates: mirror.0x.sgResolving Dependencies--> Running transaction check---> Package gcc.x86_64 0:4.8.5-36.el7_6.2 will be installed--> Processing Dependency: cpp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-36.el7_6.2.x86_64--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-36.el7_6.2.x86_64--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-36.el7_6.2.x86_64--> Running transaction check---> Package cpp.x86_64 0:4.8.5-36.el7_6.2 will be installed---> Package glibc-devel.x86_64 0:2.17-260.el7_6.5 will be installed--> Processing Dependency: glibc-headers = 2.17-260.el7_6.5 for package: glibc-devel-2.17-260.el7_6.5.x86_64--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-260.el7_6.5.x86_64---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed--> Running transaction check---> Package glibc-headers.x86_64 0:2.17-260.el7_6.5 will be installed--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-260.el7_6.5.x86_64--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-260.el7_6.5.x86_64--> Running transaction check---> Package kernel-headers.x86_64 0:3.10.0-957.12.2.el7 will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================================================================ Package Arch Version Reposit================================================================================================================================Installing: gcc x86_64 4.8.5-36.el7_6.2 updatesInstalling for dependencies: cpp x86_64 4.8.5-36.el7_6.2 updates glibc-devel x86_64 2.17-260.el7_6.5 updates glibc-headers x86_64 2.17-260.el7_6.5 updates kernel-headers x86_64 3.10.0-957.12.2.el7 updates libmpc x86_64 1.0.1-3.el7 base mpfr x86_64 3.1.1-4.el7 baseTransaction Summary================================================================================================================================Install 1 Package (+6 Dependent packages)Total download size: 32 MInstalled size: 60 MIs this ok [y/d/N]: yDownloading packages:(1/7): cpp-4.8.5-36.el7_6.2.x86_64.rpm | 5.9 MB 00:00:00(2/7): glibc-devel-2.17-260.el7_6.5.x86_64.rpm | 1.1 MB 00:00:00(3/7): glibc-headers-2.17-260.el7_6.5.x86_64.rpm | 683 kB 00:00:00(4/7): gcc-4.8.5-36.el7_6.2.x86_64.rpm | 16 MB 00:00:00(5/7): libmpc-1.0.1-3.el7.x86_64.rpm | 51 kB 00:00:00(6/7): mpfr-3.1.1-4.el7.x86_64.rpm | 203 kB 00:00:00(7/7): kernel-headers-3.10.0-957.12.2.el7.x86_64.rpm | 8.0 MB 00:00:00--------------------------------------------------------------------------------------------------------------------------------Total 29 MB/s | 32 MB 00:00:01Running transaction checkRunning transaction testTransaction test succeededRunning transaction Installing : mpfr-3.1.1-4.el7.x86_64 1/7 Installing : libmpc-1.0.1-3.el7.x86_64 2/7 Installing : cpp-4.8.5-36.el7_6.2.x86_64 3/7 Installing : kernel-headers-3.10.0-957.12.2.el7.x86_64 4/7 Installing : glibc-headers-2.17-260.el7_6.5.x86_64 5/7 Installing : glibc-devel-2.17-260.el7_6.5.x86_64 6/7 Installing : gcc-4.8.5-36.el7_6.2.x86_64 7/7 Verifying : mpfr-3.1.1-4.el7.x86_64 1/7 Verifying : glibc-devel-2.17-260.el7_6.5.x86_64 2/7 Verifying : glibc-headers-2.17-260.el7_6.5.x86_64 3/7 Verifying : libmpc-1.0.1-3.el7.x86_64 4/7 Verifying : cpp-4.8.5-36.el7_6.2.x86_64 5/7 Verifying : gcc-4.8.5-36.el7_6.2.x86_64 6/7 Verifying : kernel-headers-3.10.0-957.12.2.el7.x86_64 7/7Installed: gcc.x86_64 0:4.8.5-36.el7_6.2Dependency Installed: cpp.x86_64 0:4.8.5-36.el7_6.2 glibc-devel.x86_64 0:2.17-260.el7_6.5 glibc-headers.x86_64 0:2.17-260.el7_6.5 kernel-headers.x86_64 0:3.10.0-957.12.2.el7 libmpc.x86_64 0:1.0.1-3.el7 mpfr.x86_64 0:3.1.1-4.el7Complete!

centos7下安装 python3_第1张图片
image

你可能感兴趣的:(centos7下安装 python3)