Como instalar o python 3.8 diretamente em /usr/bin?

0

Pergunta

Tentando instalar o python em 3,8 a partir do fonte no CentOS 7.9.

O padrão instalado o python é 2.7.5 e está localizado em /usr/bin.

sudo yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel
sudo cd /opt
sudo wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz
sudo tar xzf Python-3.8.12.tgz
cd Python-3.8.12
sudo ./configure --enable-optimizations
sudo make install

Eu pensei make install gostaria de criar python3 em /usr/bin, mas não o fez.

centos7 linux python-3.x
2021-11-22 05:13:31
1

Melhor resposta

1

Por padrão, o CPython instalar o python compilado em binário /usr/local/bin/python. (código de origem: https://github.com/python/cpython/blob/main/configure#L571) Você pode especificar o prefixo mannually como configure --prefix=/usr.

2021-11-22 05:21:07

Em outros idiomas

Esta página está em outros idiomas

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................