简体   繁体   中英

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

...
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.

This fix will only work this way if Xcode is installed. If not you may try to symlink clang from another location.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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