简体   繁体   English

无法在macOS Sierra上使用自制软件安装mod_python

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

i tried to install mod_python but got error, than i tried use this solution but error still exist 我尝试安装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

How this can be resolved? 如何解决?

I am not sure if this question is still open - if it is. 我不确定这个问题是否仍然存在-如果是。

One possible fix is to create a symlink of the clang compiler at the given location and install afterwards using homebrew. 一种可能的解决方法是在给定位置创建clang编译器的符号链接,然后使用自制程序安装。

This fix will only work this way if Xcode is installed. 如果安装了Xcode,此修复程序将仅以这种方式起作用。 If not you may try to symlink clang from another location. 如果不是,您可以尝试从其他位置符号链接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

For further information please see: 有关更多信息,请参见:

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

[2] https://apple.stackexchange.com/questions/115646/how-can-i-create-a-symbolic-link-in-terminal [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