簡體   English   中英

無法在macOS Sierra上使用自制軟件安裝mod_python

[英]Unable to install mod_python with homebrew on macOS Sierra

我嘗試安裝mod_python但出現錯誤,比我嘗試使用解決方案但錯誤仍然存​​在

...
Building mod_python.so.

/usr/sbin/apxs -I/private/tmp/mod_python-20161017-58272-9mx4n3/mod_python-3.5.0/src/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE -Wc,'-arch x86_64' -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c version.c include/_apachemodule.h  include/filterobject.h  include/hlist.h include/mod_python.h  include/psp_flex.h include/psp_parser.h include/requestobject.h include/tableobject.h include/connobject.h include/finfoobject.h include/hlistobject.h include/mp_version.h include/_pspmodule.h  include/psp_string.h  include/serverobject.h include/util.h -arch x86_64 -Wl,-F/System/Library/Frameworks -framework Python -u _PyMac_Error /System/Library/Frameworks/ -ldl  -framework CoreFoundation
/usr/local/opt/apr/libexec/build-1/libtool --silent --mode=compile /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/bin/cc    -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.Internal.sdk/usr/include/apr-1  -I/usr/include/apache2  -I/usr/local/opt/apr/libexec/include/apr-1   -I/usr/local/opt/apr-util/libexec/include/apr-1 -I/usr/local/opt/openssl/include -arch x86_64 -I/private/tmp/mod_python-20161017-58272-9mx4n3/mod_python-3.5.0/src/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -DENABLE_DTRACE -DMACOSX -DNDEBUG -DNDEBUG -DENABLE_DTRACE  -c -o mod_python.lo mod_python.c && touch mod_python.slo
/usr/local/opt/apr/libexec/build-1/libtool: line 1111: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/bin/cc: No such file or directory
apxs:Error: Command failed with rc=65536
.
make[2]: *** [mod_python.so] Error 1
make: *** [do_dso] Error 2

如何解決?

我不確定這個問題是否仍然存在-如果是。

一種可能的解決方法是在給定位置創建clang編譯器的符號鏈接,然后使用自制程序安裝。

如果安裝了Xcode,此修復程序將僅以這種方式起作用。 如果不是,您可以嘗試從其他位置符號鏈接clang。

ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.12.xctoolchain/usr/bin/cc

有關更多信息,請參見:

[1] https://github.com/Homebrew/homebrew-apache

[2] https://apple.stackexchange.com/questions/115646/how-can-i-create-a-symbolic-link-in-terminal

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM