python - 使用非默认 Apache Web 服务器编译 mod_wsgi?

标签 python c++ c apache gcc

我正在尝试安装 mod_wsgi 以获取更新版本的 Apache。

我目前通过 /opt/rh/httpd24/root/etc/httpd 安装了 Apache 2.4。

我想使用 2.4 而不是 2.2 进行编译。这里对语法有帮助吗?我找不到任何对该特定论点的引用。

[root@bmograba mod_wsgi-4.4.13]# ./configure -help
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-framework      enable mod_wsgi framework link
  --disable-embedded      disable mod_wsgi embedded mode

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-apxs=NAME        name of the apxs executable [[apxs]]
  --with-python=NAME      name of the python executable [[python]]

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to the package provider.

不带参数的编译平面:

[root@bmograba mod_wsgi-4.4.13]# ./configure
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for prctl... yes
checking Apache version... 2.2.15
checking for python... /usr/bin/python
configure: creating ./config.status
config.status: creating Makefile

只是为了看看包输出会寻找什么:

[root@bmograba mod_wsgi-4.4.13]# ./configure --with-PACKAGE 
configure: WARNING: you should use --build, --host, --target
configure: WARNING: unrecognized options: --with-PACKAGE
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking for httpd-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for prctl... yes
checking Apache version... 2.2.15
checking for python... /usr/bin/python
configure: creating ./config.status
config.status: creating Makefile
configure: WARNING: unrecognized options: --with-PACKAGE

最佳答案

当他们说 --with-PACKAGE 时,PACKAGE 只是包名称的占位符。您不应该按字面意思放置 --with-PACKAGE

关于python - 使用非默认 Apache Web 服务器编译 mod_wsgi?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31127196/

相关文章:

c++ - 断线异常?

c++ - 在C和C++中,如何将一个数组中的一些元素移动到一个新数组中?

c++ - Active Accessibility (COM) 调用返回不同,具体取决于调用者是线程还是进程。什么?

python 验证日期格式或空白

c++ - 偶尔会出现段错误

c++ - 编译器如何知道变量是全局变量还是局部变量(C )

c++ - 在运行时检查 C++ 共享依赖项(ldd on self)

python - pygame.mixer.Sound.play 是不规则的,尽管是定期触发的

python - 尝试从行尾获取值并将它们加在一起

python - PyArrow:使用嵌套类型在 Parquet 中存储字典列表