Docker容器Debian or Ubuntu or Mint系统编译安装python2.7.14

  • A+
所属分类:软件·服务器

Docker的时候发现它拉取的Debian or Ubuntu or Mint系统都极度精简,居然连python都木有,找了好多篇中午中文教程都没搞定,好在用谷歌找到一篇阿三写的英文教程完美解决了如何在docker系统下编译安装python2.7.14

一、前期基础准备命令

apt-get install update
apt-get install wget -y
apt-get install sudo
sudo apt-get update
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

二、下载编译安装python2.7.14

cd /usr/src
sudo wget https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz
sudo tar xzf Python-2.7.14.tgz
cd Python-2.7.14
sudo ./configure
sudo make altinstall

三、查看python

python2.7 -V

文章来源:https://tecadmin.net/install-python-2-7-on-ubuntu-and-linuxmint/#

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

,输入正确后才能评论!