Linux | 软件安装

2021/10/20 7:12:32

本文主要是介绍Linux | 软件安装,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

Linux 源码安装软件

安装 Python 3.6

1. 安装依赖工具

sudo apt-get install -y gcc make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev

2.下载源码文件压缩包

mkdir /usr/local/python3.6
cd /usr/local/python3.6
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz

3.解压文件夹

tar -xzf Python-3.6.8.tgz

4.配置编译时程序存放的路径

cd Python-3.6.8
sudo ./configure --enable-optimizations --prefix=/usr/local/bin/python3.6

5. 编译

sudo make
# 莫名其妙的很长时间

6. 安装

sudo make install

7. 设置软连接

sudo ln -s -f /usr/local/bin/python3.6/bin/python3.6 /usr/bin/python3.6
sudo ln -s -f /usr/local/bin/python3.6/bin/pip3.6 /usr/bin/pip3.6
# sudo ln -s -f /usr/local/bin/python3.6/bin/python3.6 /usr/bin/python3
# sudo ln -s -f /usr/local/bin/python3.6/bin/pip3.6 /usr/bin/pip3


这篇关于Linux | 软件安装的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程