Ubuntu自动编译和安装Python的shell脚本教程
程序员文章站
2022-03-29 12:05:17
#
#安装所需支持包
#
sudo apt-get install zlib1g-dev
sudo apt-get install libbz2-dev
sudo apt...
#
#安装所需支持包
#
sudo apt-get install zlib1g-dev
sudo apt-get install libbz2-dev
sudo apt-get install libsqlite3-dev
sudo apt-get install python3-dev
sudo apt-get install libxml2-dev
sudo apt-get install libxslt1
sudo apt-get install libffi-dev
sudo apt-get install libssl-dev
sudo apt-get install python-pip
echo "基础环境安装成功"
tar xJf Python-3.6.1.tar.xz
echo "解压成功"
cd Python-3.6.1
#配置
./configure --prefix=/opt/python3.6
#编译安装
make
echo "编译成功"
#sudo make install
sudo -H make install
echo "安装成功"
#安装环境
sudo mv /usr/bin/python /usr/bin/python-bk
sudo ln -s /opt/python3.6/bin/python3.6m /usr/bin/python;sync
python -V
echo "测试环境"
上一篇: 详尽的IPC$入侵