configure: error: Apache tool 'apxs' or 'apxs2' is required to build mod_wsgi but httpd24-httpd-devel.x86_64 is installed

95 views
Skip to first unread message

Nadia Anastopoulou

unread,
Dec 12, 2022, 7:27:50 AM12/12/22
to modwsgi
Hello,

On Redhat 7.9 server we have currently runnign Python 3.8 with wsgi.
I wanted to install also Python 3.10 and I build it from source. Then tried to install mod_wsgi by using pip but got the below error:
RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages

I tired also to build it from source but got again the same error:
./configure
checking for apxs2... no
checking for apxs... no
configure: error: Apache tool 'apxs' or 'apxs2' is required to build mod_wsgi.

As you can see httpd24-httpd and httpd24-httpd-devel are already installed and also tried to reinstall them (previous version of mod_wsgi was also succesfully installed)
yum list httpd24-httpd*
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Installed Packages
httpd24-httpd.x86_64    2.4.34-23.el7.5    @rhel-server-rhscl-7-rpms
httpd24-httpd-devel.x86_64    2.4.34-23.el7.5    @rhel-server-rhscl-7-rpms
httpd24-httpd-tools.x86_64    2.4.34-23.el7.5    @rhel-server-rhscl-7-rpms
Available Packages
httpd24-httpd-manual.noarch    2.4.34-23.el7.5    rhel-server-rhscl-7-rpms

I used following commands in order to build python 3.10
yum update
yum install openssl-devel bzip2-devel libffi-devel
--install openssl 1.1.1 from source (/usr/include/openssl)
yum remove openssl openssl-devel.x86_64
unzip openssl-OpenSSL_1_1_1-stable.zip
cd openssl-OpenSSL_1_1_1-stable/
./config --prefix=/usr/include/openssl/
make
make install
wget https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/o/openssl11-libs-1.1.1k-4.el7.x86_64.rpm
yum install ./openssl11-libs-1.1.1k-4.el7.x86_64.rpm
/usr/include/openssl/bin/openssl version  --> OpenSSL 1.1.1t-dev  xx XXX xxxx (Library: OpenSSL 1.1.1k  FIPS 25 Mar 2021)

--Install Python 3.10 from source:
cd
wget https://www.python.org/ftp/python/3.10.8/Python-3.10.8.tgz
tar -xzf Python-3.10.8.tgz
cd Python-3.10.8
make clean
./configure --enable-optimizations --with-openssl=/usr/include/openssl
make altinstall

Do you have any idea what could be wrong?

Thank you in advance,
Nadia

Graham Dumpleton

unread,
Dec 12, 2022, 7:52:55 AM12/12/22
to modwsgi
Red Hat SCL packages are not installed in standard locations. You have to add the bin directory for the specific Red Hat SCL package to your PATH, or when configuring/building mod_wsgi supply the --with-apxs option to tell it where the "apxs" or "apxs2" script is installed. I don't remember where they install SCL packages, so use the commands:

find / -name apxs
find / -name apxs2

to try and find the command.

Sorry for the slow reply, been travelling the last couple of weeks.

Graham

Reply all
Reply to author
Forward
0 new messages