我正在尝试将Python和mod_wsgi
添加到XAMPP / LAMPP服务器。我正在运行Ubuntu 13.10。为此,我正在关注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
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
我查了一下“命令失败,rc = 65536”。我读过的论坛说它通常表明Python文件是32位,而服务器和mod_wsgi
是64位。我回去重新安装了64位版本的Python。
此外,我使用libtool
仔细检查我已安装sudo apt-get install libtool
,但我检查了/opt/lampp/build/libtool
并且该文件夹/文件不存在,所以可能问题是我没有在服务器上安装libtool
?如果这是问题,我该如何解决?
答案 0 :(得分:2)
某些Apache发行版(例如lampp)不完整,并未提供您自己构建其他Apache模块所需的所有部分。这对你来说似乎包括他们最初用来构建Apache的libtool软件。您需要向lampp软件维护人员抱怨他们的包裹为何不完整。更好的是,只需使用OS提供的Apache包。