Python源码编译安装

源码安装LAMP步骤简述

1.下载python软件包 
shell> wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz

2.安装源码编译环境
shell> yum install -y gcc gcc-c++ openssl openssl-devel zlib zlib-devel readline readline-devel

3.解压源码包
shell> tar Jxvf Python-3.6.0.tar.xz -C /usr/local/src/

4.源码编译
shell> cd /usr/local/src/Python-3.6.0
shell> ../configure --prefix=/usr/local/python36 --with-ssl
shell> make && make install

5.创建软链接
shell> ln -s /usr/local/python36/bin/python3.6 /usr/local/bin 
shell> ln -s /usr/local/python36/bin/pip3.6 /usr/local/bin

6.测试
shell> python3.6
Python 3.6.0 (default, Dec 27 2021, 04:01:28) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值