2011-04-03 111 views
0

我必須在CentOS 64bits和python3.2上安裝mod_wsgi庫,但是現在當我嘗試運行'make'命令時給了我這個錯誤,任何人都可以幫助我,提前致謝!在CentOS 5上安裝mod_wsgi的問題

/usr/sbin/apxs -c -I/usr/local/include/python3.2m -DNDEBUG mod_wsgi.c -L/usr/local/lib -L/usr/local/lib/python3.2/config -lpython3.2 -lpthread -ldl -lutil -lm 
/usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/local/include/python3.2m -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo 
mod_wsgi.c: In function 'wsgi_server_group': 
mod_wsgi.c:949: warning: unused variable 'value' 
mod_wsgi.c: In function 'Log_writelines': 
mod_wsgi.c:1732: warning: unused variable 'msg' 
mod_wsgi.c: In function 'Adapter_output': 
mod_wsgi.c:3010: warning: unused variable 'n' 
mod_wsgi.c: In function 'Adapter_environ': 
mod_wsgi.c:3589: warning: implicit declaration of function 'PyCObject_FromVoidPtr' 
mod_wsgi.c:3589: warning: assignment makes pointer from integer without a cast 
mod_wsgi.c: In function 'Adapter_file_wrapper': 
mod_wsgi.c:4024: warning: unused variable 'result' 
mod_wsgi.c: In function 'wsgi_python_term': 
mod_wsgi.c:5631: warning: unused variable 'tstate' 
mod_wsgi.c:5630: warning: unused variable 'interp' 
mod_wsgi.c: In function 'wsgi_python_child_init': 
mod_wsgi.c:6760: warning: unused variable 'l' 
mod_wsgi.c:6658: warning: unused variable 'interp' 
mod_wsgi.c: In function 'wsgi_add_import_script': 
mod_wsgi.c:7411: warning: unused variable 'error' 
mod_wsgi.c: In function 'wsgi_add_handler_script': 
mod_wsgi.c:7859: warning: unused variable 'dconfig' 
mod_wsgi.c:7858: warning: unused variable 'sconfig' 
mod_wsgi.c: In function 'Dispatch_environ': 
mod_wsgi.c:8340: warning: assignment makes pointer from integer without a cast 
mod_wsgi.c: In function 'wsgi_hook_handler': 
mod_wsgi.c:8905: warning: suggest parentheses around assignment used as truth value 
mod_wsgi.c:8907: warning: suggest parentheses around assignment used as truth value 
mod_wsgi.c:8909: warning: suggest parentheses around assignment used as truth value 
mod_wsgi.c:8913: warning: suggest parentheses around assignment used as truth value 
mod_wsgi.c:8933: warning: suggest parentheses around assignment used as truth value 
mod_wsgi.c:8935: warning: suggest parentheses around assignment used as truth value 
mod_wsgi.c:8938: warning: suggest parentheses around assignment used as truth value 
mod_wsgi.c: In function 'wsgi_daemon_worker': 
mod_wsgi.c:10227: warning: unused variable 'duration' 
mod_wsgi.c:10226: warning: unused variable 'start' 
mod_wsgi.c: In function 'wsgi_hook_daemon_handler': 
mod_wsgi.c:12423: warning: unused variable 'i' 
mod_wsgi.c:12421: warning: unused variable 'elts' 
mod_wsgi.c:12420: warning: unused variable 'head' 
mod_wsgi.c: In function 'Auth_environ': 
mod_wsgi.c:13299: warning: assignment makes pointer from integer without a cast 
mod_wsgi.c: At top level: 
mod_wsgi.c:7122: warning: 'wsgi_set_py3k_warning_flag' defined but not used 
mod_wsgi.c:7824: warning: 'wsgi_set_user_authoritative' defined but not used 
mod_wsgi.c:14338: warning: 'wsgi_hook_check_user_id' defined but not used 
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -o mod_wsgi.la -rpath /usr/lib64/httpd/modules -module -avoid-version mod_wsgi.lo -L/usr/local/lib -L/usr/local/lib/python3.2/config -lpython3.2 -lpthread -ldl -lutil -lm 
/usr/bin/ld: cannot find -lpython3.2 
collect2: ld returned 1 exit status 
apxs:Error: Command failed with rc=65536 
. 
make: *** [mod_wsgi.la] Error 1 
+0

請顯示您爲'mod_wsgi'完成的完整'。/ configure'行。以及如何編譯或安裝Python 3.2(yum?self-compile?) – 2011-04-03 18:48:49

+0

./configure --with-apxs =/usr/sbin/apxs --enable-shared --with-python =/usr/local/bin/python3.2,我已編譯 – hidura 2011-04-03 18:54:23

回答

3

您的Python 3.2安裝似乎被破壞,缺少位或構建錯誤。即使你修正了這個問題,除非你使用Subversion版本庫中的mod_wsgi,因爲Python 3.2不能與官方tarball版本一起使用。根據錯誤消息,甚至似乎你甚至可能試圖使用比最新的官方tarball更老版本的mod_wsgi,因爲行號與預期的不匹配。

+0

我已經嘗試過該版本,並給我同樣的錯誤,是Python,但我無法找到一個rpm版本的Python的centos,所以我試圖編譯,並沒有給我有任何的錯誤,這就是我如何編譯python3.0 ./configure --enable-shared make make install – hidura 2011-04-04 05:24:43

+0

根據錯誤,/ usr/local/lib或/ usr/local/lib/python3 .2/config包含一個libpython3.2庫。哪些libpython3.2 .so或.a文件在這些目錄中?他們有什麼權限。 – 2011-04-04 10:24:18

+0

他們沒有安裝。你認爲那是錯誤嗎? – hidura 2011-04-04 13:13:00