Last active
October 17, 2021 16:08
-
-
Save cedricbonhomme/4e2420230e032f0a4ae3e0dc7b34b58f to your computer and use it in GitHub Desktop.
compile, install mod-wsgi and compile Python with shared libraries support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure and install pyenv: | |
# https://gist.github.com/cedricbonhomme/ababe00d0a675ea5c69d777276e8f375 | |
# Install apxs2: | |
sudo apt install apache2-dev | |
# Install Python with shared libraries support: | |
CONFIGURE_OPTS=--enable-shared pyenv install 3.10.0 | |
# Install mod-wsgi | |
./configure --with-python=<PATH> --with-apxs=<PATH> | |
#./configure --with-apxs=/usr/bin/apxs2 --with-python=/home/<user>/.pyenv/shims/python | |
make | |
sudo make install | |
# If necessary, add this line in Apache config | |
# LoadFile /home/<user>/.pyenv/versions/3.10.0/lib/libpython3.10.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment