I am using the default Apache installation that comes with Snow Leopard and I have some things installed like MySQL, Rudix (Unix ports and packages) and Xcode.
When I type:
$ sudo apachectl start
I receive this output:
dyld: Symbol not found: _apr_dir_open$INODE64
Referenced from: /usr/local/sbin/httpd
Expected in: /usr/local/lib/libapr-1.0.dylib
in /usr/local/sbin/httpd
/usr/local/sbin/apachectl: line 78: 2023 Trace/BPT trap $HTTPD -k $ARGV
I don't know if it's related but my .bash_profile
has this line (I typed it because import MySQLdb
was not working in Python):
export DYLD_LIBRARY_PATH="/usr/local/mysql/lib/:$D开发者_JAVA技巧YLD_LIBRARY_PATH"
If I tick Web Sharing using System Preferences the Apache starts and work, but I wan't to start it using the terminal, maybe I am forgot to pass important arguments to the apachectl
command.
The Web Sharing
option of System Preferences
enables the Apple-supplied Apache. Its apachectl
is /usr/sbin/apachectl
. You appear to have installed another version of Apache in /usr/local
; note the /usr/local/sbin/apachectl
path. So you are not using the Apple-supplied Apache installation when you are running from the terminal and the version you are using appears to not have been installed correctly. One way to ensure you are using the Apple-supplied Apache is to specify the full path:
$ sudo /usr/sbin/apachectl start
精彩评论