简体   繁体   English

如何在Ubuntu的xampp服务器上安装mod_wsgi? 遇到libtool错误

[英]How do I install mod_wsgi to xampp server on Ubuntu? Running into libtool errors

I'm trying to add Python and mod_wsgi to an XAMPP/LAMPP server. 我正在尝试将Python和mod_wsgi添加到XAMPP / LAMPP服务器。 I'm running Ubuntu 13.10. 我正在运行Ubuntu 13.10。 To do so, I'm following these instructions . 为此,我正在按照以下说明进行操作

cd /opt/lampp
wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tgz
tar xzf Python-2.7.1.tgz -C /opt/lampp
cd Python-2.7.1
./configure --prefix=/opt/lampp --enable-shared
export LD_LIBRARY_PATH=/opt/lampp/lib:/usr/lib/:/usr/local/lib:/var/lib
export LD_RUN_PATH=/opt/lampp/lib:$LD_RUN_PATH
make
sudo make install

After make , I get the following error: make之后,出现以下错误:

mod_wsgi-3.3 $ make
/opt/lampp/bin/apxs -c -I/opt/lampp/include/python2.7 -DNDEBUG   mod_wsgi.c -L/opt/lampp/lib -L/opt/lampp/lib/python2.7/config  -lpython2.7 -lpthread -ldl  -lutil -lm
/opt/lampp/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -I/opt/lampp/include/c-client -I/opt/lampp/include/libpng -I/opt/lampp/include/freetype2 -O3 -fPIC -L/opt/lampp/lib -I/opt/lampp/include -I/opt/lampp/include/ncurses  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/opt/lampp/include  -I/opt/lampp/include/apr-1   -I/opt/lampp/include/apr-1 -I/opt/lampp/include -I/opt/lampp/include/python2.7 -DNDEBUG  -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
/opt/lampp/build/libtool: 1555: /opt/lampp/build/libtool: preserve_args+= --silent: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= gcc: not found
/opt/lampp/build/libtool: 2419: /opt/lampp/build/libtool: later+= -prefer-pic: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -std=gnu99: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/c-client: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/libpng: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/freetype2: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -O3: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -fPIC: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -L/opt/lampp/lib: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/ncurses: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -DLINUX=2: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -D_REENTRANT: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -D_GNU_SOURCE: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -pthread: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/apr-1: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/apr-1: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -I/opt/lampp/include/python2.7: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -DNDEBUG: not found
/opt/lampp/build/libtool: 1: eval: base_compile+= -c: not found
libtool: compile: you must specify a compilation command
libtool: compile: Try `libtool --help --mode=compile' for more information.
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1

I looked up "command failed with rc=65536". 我查找“命令失败,rc = 65536”。 The forums I read said it usually indicates that the Python files are 32bit, when the server and mod_wsgi is 64bit. 我读过的论坛说,当服务器和mod_wsgi为64位时,通常表明Python文件为32位。 I went back and re-installed the 64bit version of Python. 我返回并重新安装了Python的64位版本。

Also, I double-checked that I have libtool installed, using sudo apt-get install libtool , but I checked /opt/lampp/build/libtool and that folder/files don't exist, so perhaps the issue is that I don't have libtool installed to the server? 另外,我双重检查,我已经libtool安装,使用sudo apt-get install libtool ,但我检查/opt/lampp/build/libtool和该文件夹/文件不存在,那么也许问题是,我不是否已将libtool安装到服务器? If that is the issue, how do I fix that? 如果那是问题,我该如何解决?

Some Apache distributions such as lampp are incomplete and do not provide all the parts which you need to build other Apache modules yourself. 某些Apache发行版(例如lampp)不完整,不能提供您自己构建其他Apache模块所需的所有部分。 This for you appears to include the libtool software they used to build Apache originally. 对于您来说,这似乎包括他们最初用来构建Apache的libtool软件。 You need to complain to the lampp software maintainers as to why their package is incomplete. 您需要向Lampp软件维护人员抱怨其软件包不完整的原因。 Better still, just use the OS supplied packages for Apache. 更好的是,只需使用OS随附的Apache软件包即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM