从源码安装软件
common steps:
- download source code
- configure to generate a Makefile
- run
make - run
make installto install
done
install python in linux from source code
-
first install openssl, please refer to this page (doing this to avoid a possible error:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available) -
download python source code, and run
./configure --with-openssl=/home/username/opensslto generate a Makefile -
If you already have a version of Python installed on your system and you want to install the new version alongside it, use this command:
$ make altinstall
The build process may take some time.
If you want to replace your current version of Python with this new version, you should uninstall your current Python package using your package manager (such as apt or dnf) and then install:
$ make install
- at last, run
python3 --versionto show version info, andpython3 -m sslwith no outputs, it's ok.
refers to https://opensource.com/article/20/4/install-python-linux






网友评论