如何在XAMPP上安装apxs

5

我有一个站点正在Apache服务器上运行,我想使用服务器和Web浏览器运行Python脚本。 我正在使用xampp,并且已经研究了我必须使用 modwsgi,并且我已经下载了zip文件并将其解压到我的桌面上。 现在在命令提示符中,我运行:

setup.py install

第一次我做这个时,我没有安装Python的设置工具(我有Python 2.7.8,运行在64位的Windows 7上),所以我去下载了它,但是现在当我再次运行命令时,我得到了以下信息。
RuntimeError: The 'apxs' command appears to not to be installed or is not exectuable.
Please check the list of prerequistes in the documentation for the package and install 
any missing Apache httpd server packages.

我该如何安装apxs呢?因为我没有Apache,只有xampp。

1个回答

4
我在Windows的XAMPP上安装了apxs。我写了一篇博客文章,其中包含完整的解决方案(用西班牙语写的)。我基本上编译了自己的apxs版本。步骤如下:
  • 安装适用于Windows的ActiveState Perl
  • C:\xampp\apache\bin添加到环境变量Path
  • 此处下载apxs
  • C:\xampp\apache\bin中解压缩tar.gz文件。
  • 执行:

ppm install dmake

cd c:\xampp\apache\bin\apxs

perl Configure.pl --with-apache2=C:\xampp\apache --with-apache-prog=httpd.exe


执行“ppm install dmake”命令出现“无法找到dmake包的PPD文件”的错误。 - Maria Ines Parnisari
perl Configure.pl --with-apache2=C:\xampp\apache --with-apache-prog=httpd.exe 给出了 在 @INC 中找不到 util.pl(@INC 包含:C:/StrawberryPerl/perl/site/lib C:/StrawberryPerl/perl/vendor/lib C:/StrawberryPerl/perl/lib),位于 Configure.pl 的第 10 行。 - Maria Ines Parnisari
@MariaInesParnisari 使用'perl -I /path/to/util.pl configure.pl'。这将解决'@INC'问题。 - Nikhil Gupta
@MariaInesParnisari,这是因为您安装了Strawberry Perl而不是来自activestate.com的ActiveState perl,只需按照步骤完全操作即可。 - Alan Deep

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接