2012-01-11 188 views
1

There is another question關於在OSX上安裝mod_mono,但我會假設在Lion出現之前,這對開發人員(如python版本)有一些重大改變。在Mac OSX Lion上安裝mod_mono時遇到問題

我按照mod_mono-2.10的INSTALL自述文件中的說明進行操作。徒勞無功。

正是我所做的就是這樣的:

tar xvfz mod_mono-2.10.tar.gz 
cd mod_mono-X.Y.Z 
./configure --prefix=/usr 
make 
make install 

$ apachectl -t 
httpd: Syntax error on line 54 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/mod_mono.conf: Cannot load /usr/libexec/apache2/mod_mono.so into server: 
dlopen(/usr/libexec/apache2/mod_mono.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_mono.so: mach-o, but wrong architecture 

看來是mod_mono是不是真正的問題。它本身就是單聲道。

smeatonj$ file /usr/bin/mono 
/usr/bin/mono: Mach-O executable i386 
smeatonj$ file /usr/libexec/apache2/mod_mono.so 
/usr/libexec/apache2/mod_mono.so: Mach-O 64-bit bundle x86_64 
meatonj$ file /usr/sbin/httpd 
/usr/sbin/httpd: Mach-O universal binary with 2 architectures 
/usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable x86_64 
/usr/sbin/httpd (for architecture i386): Mach-O executable i386 
smeatonj$ file /usr/bin/mono 
/usr/bin/mono: Mach-O executable i386 

單聲道程序包本身沒有編譯爲64位。也許我應該有充分閱讀the install guide,但這裏是關注的主要位:

32位和64位支持

在本網站上發佈提供32位單聲道虛擬機的單包。

從Mono 2.10開始支持64位虛擬機只有在從源代碼構建Mono並安裝您自己的虛擬機副本時纔可用。未來,我們將爲用戶提供單聲道和單聲道64位二進制文​​件。

我們Windows.Forms的實現使用碳,正因爲如此,它不會在64位單聲道工作:

的64位支持今天這就是爲什麼我們還沒有完全切換到它有一些限制。 MonoDevelop使用Carbon進行菜單集成,因此它不能在64位虛擬機上運行。 MonoMac綁定尚未被移植到64位。 全面支持64位Mono還需要我們發佈64位Gtk +堆棧,這將增加大多數用戶的下載大小。

我試圖重新編譯I386是mod_mono,以便它可以與單聲道運行時運行

sudo -s 
CFLAGS="-arch i386" ./configure --prefix=/usr 
make 
make install 

smeatonj$ file /usr/libexec/apache2/mod_mono.so 
/usr/libexec/apache2/mod_mono.so: Mach-O bundle i386 

同樣的問題:

$ apachectl -t 
httpd: Syntax error on line 54 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/mod_mono.conf: Cannot load /usr/libexec/apache2/mod_mono.so into server: 
dlopen(/usr/libexec/apache2/mod_mono.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_mono.so: mach-o, but wrong architecture 

我該怎麼能夠在運行Apache是​​mod_mono沒有編譯和安裝64位版本的單聲道?我想我可以並排執行,但是整個過程非常耗時......我不確定是否需要維護官方軟件包,以及針對測試Web服務器的不同版本。

這裏是是mod_mono的最新重新編譯的確切端子輸出:

Josh-Mac:mod_mono-2.10 smeatonj$ ./configure 
checking for a BSD-compatible install... /usr/bin/install -c 
checking whether build environment is sane... yes 
checking for a thread-safe mkdir -p... ./install-sh -c -d 
checking for gawk... no 
checking for mawk... no 
checking for nawk... no 
checking for awk... awk 
checking whether make sets $(MAKE)... yes 
checking for gcc... gcc 
checking for C compiler default output file name... a.out 
checking whether the C compiler works... yes 
checking whether we are cross compiling... no 
checking for suffix of executables... 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc accepts -g... yes 
checking for gcc option to accept ISO C89... none needed 
checking for style of include used by make... GNU 
checking dependency style of gcc... gcc3 
checking build system type... i386-apple-darwin11.2.0 
checking host system type... i386-apple-darwin11.2.0 
checking for a sed that does not truncate output... /usr/bin/sed 
checking for grep that handles long lines and -e... /usr/bin/grep 
checking for egrep... /usr/bin/grep -E 
checking for fgrep... /usr/bin/grep -F 
checking for ld used by gcc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld 
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no 
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm 
checking the name lister (/usr/bin/nm) interface... BSD nm 
checking whether ln -s works... yes 
checking the maximum length of command line arguments... 196608 
checking whether the shell understands some XSI constructs... yes 
checking whether the shell understands "+="... yes 
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r 
checking for objdump... no 
checking how to recognize dependent libraries... pass_all 
checking for ar... ar 
checking for strip... strip 
checking for ranlib... ranlib 
checking command to parse /usr/bin/nm output from gcc object... ok 
checking for dsymutil... dsymutil 
checking for nmedit... nmedit 
checking for lipo... lipo 
checking for otool... otool 
checking for otool64... no 
checking for -single_module linker flag... yes 
checking for -exported_symbols_list linker flag... yes 
checking how to run the C preprocessor... gcc -E 
checking for ANSI C header files... yes 
checking for sys/types.h... yes 
checking for sys/stat.h... yes 
checking for stdlib.h... yes 
checking for string.h... yes 
checking for memory.h... yes 
checking for strings.h... yes 
checking for inttypes.h... yes 
checking for stdint.h... yes 
checking for unistd.h... yes 
checking for dlfcn.h... yes 
checking for objdir... .libs 
checking if gcc supports -fno-rtti -fno-exceptions... no 
checking for gcc option to produce PIC... -fno-common -DPIC 
checking if gcc PIC flag -fno-common -DPIC works... yes 
checking if gcc static flag -static works... no 
checking if gcc supports -c -o file.o... yes 
checking if gcc supports -c -o file.o... (cached) yes 
checking whether the gcc linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes 
checking dynamic linker characteristics... darwin11.2.0 dyld 
checking how to hardcode library paths into programs... immediate 
checking whether stripping libraries is possible... yes 
checking if libtool supports shared libraries... yes 
checking whether to build shared libraries... yes 
checking whether to build static libraries... yes 
checking whether byte ordering is bigendian... no 
checking for pkg-config... /usr/bin/pkg-config 
checking for sys/wait.h that is POSIX.1 compatible... yes 
checking netdb.h usability... yes 
checking netdb.h presence... yes 
checking for netdb.h... yes 
checking for unistd.h... (cached) yes 
checking for an ANSI C-conforming const... yes 
checking for pid_t... yes 
checking for size_t... yes 
checking whether time.h and sys/time.h may both be included... yes 
checking vfork.h usability... no 
checking vfork.h presence... no 
checking for vfork.h... no 
checking for fork... yes 
checking for vfork... yes 
checking for working fork... yes 
checking for working vfork... (cached) yes 
checking for ANSI C header files... (cached) yes 
checking sys/select.h usability... yes 
checking sys/select.h presence... yes 
checking for sys/select.h... yes 
checking sys/socket.h usability... yes 
checking sys/socket.h presence... yes 
checking for sys/socket.h... yes 
checking types of arguments for select... int,fd_set *,struct timeval * 
checking for memset... yes 
checking for mkdir... yes 
checking for unsetenv... yes 
checking for putenv... yes 
checking for setenv... yes 
checking for setrlimit... yes 
checking for select... yes 
checking for strcasecmp... yes 
checking for strerror... yes 
checking for strrchr... yes 
checking for dup2... yes 
checking for strndup... yes 
checking if debug mode is requested... no 
checking What level debug messages should be printed at... debug output disabled 
checking whether mod_mono should remove the DISPLAY variable from environment... no 
checking if gcov compilation was requested... no 
checking if gprof support was requested... no 
checking for apxs2 in /usr/local/apache2/sbin... no 
checking for apxs in /usr/local/apache2/sbin... no 
checking for apxs2 in /usr/local/apache2/bin... no 
checking for apxs in /usr/local/apache2/bin... no 
checking for apxs2 in /usr/local/apache/sbin... no 
checking for apxs in /usr/local/apache/sbin... no 
checking for apxs2 in /usr/local/apache/bin... no 
checking for apxs in /usr/local/apache/bin... no 
checking for apxs2 in /usr/sbin... no 
checking for apxs in /usr/sbin... /usr/sbin/apxs 
checking for apr-1-config in /usr/sbin... no 
checking for apr-config in /usr/sbin... no 
checking for apr-1-config in /usr/local/apache2/sbin... no 
checking for apr-config in /usr/local/apache2/sbin... no 
checking for apr-1-config in /usr/local/apache2/bin... no 
checking for apr-config in /usr/local/apache2/bin... no 
checking for apr-1-config in /usr/local/apache/sbin... no 
checking for apr-config in /usr/local/apache/sbin... no 
checking for apr-1-config in /usr/local/apache/bin... no 
checking for apr-config in /usr/local/apache/bin... no 
checking for apr-1-config in /usr/sbin... no 
checking for apr-config in /usr/sbin... no 
checking for apr-1-config in /usr/bin... found. 
checking for apu-1-config in /usr/sbin... no 
checking for apu-config in /usr/sbin... no 
checking for apu-1-config in /usr/local/apache2/sbin... no 
checking for apu-config in /usr/local/apache2/sbin... no 
checking for apu-1-config in /usr/local/apache2/bin... no 
checking for apu-config in /usr/local/apache2/bin... no 
checking for apu-1-config in /usr/local/apache/sbin... no 
checking for apu-config in /usr/local/apache/sbin... no 
checking for apu-1-config in /usr/local/apache/bin... no 
checking for apu-config in /usr/local/apache/bin... no 
checking for apu-1-config in /usr/sbin... no 
checking for apu-config in /usr/sbin... no 
checking for apu-1-config in /usr/bin... found. 
checking Apache version... 2.2 
checking for http_protocol.h... yes 
configure: creating ./config.status 
config.status: creating Makefile 
config.status: creating mod_mono.conf 
config.status: creating src/Makefile 
config.status: creating man/mod_mono.8 
config.status: creating man/Makefile 
config.status: creating include/mod_mono_config.h 
config.status: executing depfiles commands 
config.status: executing libtool commands 
config.status: executing quiet commands 
./config.status: line 2068: ./scripts/patch-quiet.sh: No such file or directory 
config.status: executing quiet-libtool commands 
--- 
Configuration summary for mod_mono 

    * Installation prefix = /usr/local 
    * Apache version = 2.2 
    * Apache modules directory = /usr/libexec/apache2 
    * apxs = /usr/sbin/apxs 
    * apr-config = /usr/bin/apr-1-config 
    * apu-config = /usr/bin/apu-1-config 
    * CFLAGS = -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 
    * Verbose logging (debug) = no 
    * GCOV options used = no 
    * Profiling enabled = no 
    * mono prefix = /Library/Frameworks/Mono.framework/Versions/2.10.8 
    * Default MonoApplicationsConfigDir = /private/etc/apache2/mod-mono-applications 

--- 
Josh-Mac:mod_mono-2.10 smeatonj$ make 
Making all in src 
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apache2 -g -O2 -I/usr/include/apache2 -I/usr/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-mod_mono.lo -MD -MP -MF .deps/mod_mono_la-mod_mono.Tpo -c -o mod_mono_la-mod_mono.lo `test -f 'mod_mono.c' || echo './'`mod_mono.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apache2 -g -O2 -I/usr/include/apache2 -I/usr/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-mod_mono.lo -MD -MP -MF .deps/mod_mono_la-mod_mono.Tpo -c mod_mono.c -fno-common -DPIC -o .libs/mod_mono_la-mod_mono.o 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apache2 -g -O2 -I/usr/include/apache2 -I/usr/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-mod_mono.lo -MD -MP -MF .deps/mod_mono_la-mod_mono.Tpo -c mod_mono.c -o mod_mono_la-mod_mono.o >/dev/null 2>&1 
mv -f .deps/mod_mono_la-mod_mono.Tpo .deps/mod_mono_la-mod_mono.Plo 
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apache2 -g -O2 -I/usr/include/apache2 -I/usr/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-mono-io-portability.lo -MD -MP -MF .deps/mod_mono_la-mono-io-portability.Tpo -c -o mod_mono_la-mono-io-portability.lo `test -f 'mono-io-portability.c' || echo './'`mono-io-portability.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apache2 -g -O2 -I/usr/include/apache2 -I/usr/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-mono-io-portability.lo -MD -MP -MF .deps/mod_mono_la-mono-io-portability.Tpo -c mono-io-portability.c -fno-common -DPIC -o .libs/mod_mono_la-mono-io-portability.o 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apache2 -g -O2 -I/usr/include/apache2 -I/usr/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-mono-io-portability.lo -MD -MP -MF .deps/mod_mono_la-mono-io-portability.Tpo -c mono-io-portability.c -o mod_mono_la-mono-io-portability.o >/dev/null 2>&1 
mv -f .deps/mod_mono_la-mono-io-portability.Tpo .deps/mod_mono_la-mono-io-portability.Plo 
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apache2 -g -O2 -I/usr/include/apache2 -I/usr/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-glib_compat.lo -MD -MP -MF .deps/mod_mono_la-glib_compat.Tpo -c -o mod_mono_la-glib_compat.lo `test -f 'glib_compat.c' || echo './'`glib_compat.c 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apache2 -g -O2 -I/usr/include/apache2 -I/usr/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-glib_compat.lo -MD -MP -MF .deps/mod_mono_la-glib_compat.Tpo -c glib_compat.c -fno-common -DPIC -o .libs/mod_mono_la-glib_compat.o 
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apache2 -g -O2 -I/usr/include/apache2 -I/usr/local/include -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/include/apr-1 -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-glib_compat.lo -MD -MP -MF .deps/mod_mono_la-glib_compat.Tpo -c glib_compat.c -o mod_mono_la-glib_compat.o >/dev/null 2>&1 
mv -f .deps/mod_mono_la-glib_compat.Tpo .deps/mod_mono_la-glib_compat.Plo 
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\" -g -O2 -I/usr/include/apache2 -I/usr/local/include -I/usr/include/apr-1 -I/usr/include/apr-1 -module -o mod_mono.la -rpath /usr/local/lib mod_mono_la-mod_mono.lo mod_mono_la-mono-io-portability.lo mod_mono_la-glib_compat.lo 
libtool: link: gcc -Wl,-undefined -Wl,dynamic_lookup -o .libs/mod_mono.0.so -bundle .libs/mod_mono_la-mod_mono.o .libs/mod_mono_la-mono-io-portability.o .libs/mod_mono_la-glib_compat.o  
libtool: link: dsymutil .libs/mod_mono.0.so || : 
libtool: link: (cd ".libs" && rm -f "mod_mono.so" && ln -s "mod_mono.0.so" "mod_mono.so") 
libtool: link: ar cru .libs/mod_mono.a mod_mono_la-mod_mono.o mod_mono_la-mono-io-portability.o mod_mono_la-glib_compat.o 
libtool: link: ranlib .libs/mod_mono.a 
libtool: link: (cd ".libs" && rm -f "mod_mono.la" && ln -s "../mod_mono.la" "mod_mono.la") 
Making all in man 
make[1]: Nothing to be done for `all'. 
make[1]: Nothing to be done for `all-am'. 
Josh-Mac:mod_mono-2.10 smeatonj$ sudo make install 
Making install in src 
/bin/sh /Users/smeatonj/Development/src/mod_mono-2.10/install-sh -d "/usr/libexec/apache2" 
/usr/sbin/apxs -S LIBEXECDIR="/usr/libexec/apache2" -i -n mono mod_mono.la 
/usr/share/httpd/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1/build-1/libtool' mod_mono.la /usr/libexec/apache2 
/usr/share/apr-1/build-1/libtool --mode=install cp mod_mono.la /usr/libexec/apache2/ 
libtool: install: cp .libs/mod_mono.0.so /usr/libexec/apache2/mod_mono.0.so 
libtool: install: (cd /usr/libexec/apache2 && { ln -s -f mod_mono.0.so mod_mono.so || { rm -f mod_mono.so && ln -s mod_mono.0.so mod_mono.so; }; }) 
libtool: install: cp .libs/mod_mono.lai /usr/libexec/apache2/mod_mono.la 
libtool: install: cp .libs/mod_mono.a /usr/libexec/apache2/mod_mono.a 
libtool: install: chmod 644 /usr/libexec/apache2/mod_mono.a 
libtool: install: ranlib /usr/libexec/apache2/mod_mono.a 
libtool: install: warning: remember to run `libtool --finish /usr/local/lib' 
chmod 755 /usr/libexec/apache2/mod_mono.so 
Making install in man 
make[2]: Nothing to be done for `install-exec-am'. 
test -z "/usr/local/share/man/man8" || .././install-sh -c -d "/usr/local/share/man/man8" 
/usr/bin/install -c -m 644 './mod_mono.8' '/usr/local/share/man/man8/mod_mono.8' 
make[2]: Nothing to be done for `install-exec-am'. 
test -z "/private/etc/apache2" || ./install-sh -c -d "/private/etc/apache2" 
/usr/bin/install -c -m 644 'mod_mono.conf' '/private/etc/apache2/mod_mono.conf' 
Josh-Mac:mod_mono-2.10 smeatonj$ 

Josh-Mac:apache2 smeatonj$ sudo apachectl -t 
httpd: Could not reliably determine the server's fully qualified domain name, using Josh-Mac.local for ServerName 
Syntax OK 
Josh-Mac:apache2 smeatonj$ sudo apachectl restart 

/私營/無功/日誌/的Apache2/error_log中輸出:

[週五1月13日14:28: 51 2012] [info]刪除了PID文件/ private/var/run/httpd。PID(PID = 930)

[週五年01月13 14點28分51秒2012] [聲明]抓SIGTERM,關停

我也有安裝mod_wsgi的(唯一的其他非標準模塊),但我完全禁用了,仍然得到了SIGTERM。

有一個在控制檯正在生成一個錯誤:

13/01/12 3:22:50.793 PM org.apache.httpd: httpd: Syntax error on line 73 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/mod_mono.conf: Cannot load /usr/libexec/apache2/mod_mono.so into server: dlopen(/usr/libexec/apache2/mod_mono.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_mono.so: mach-o, but wrong architecture 
+1

我會檢查Apache錯誤日誌,看看是否有任何錯誤。 – 2012-01-11 17:15:23

+0

@Rolf,在/ var/log/apache/error_log? Apache甚至沒有啓動,所以不幸的是在那個日誌中找不到任何東西。 – 2012-01-11 22:45:53

+0

它看起來像你的apache編譯爲64位,而mod_mono編譯爲x86。 – 2012-01-11 23:53:33

回答

3

這裏是我做過什麼設置單聲道/是mod_mono在OSX 10.7,Apache2的 - 希望這樣可以節省別人幾步之遙。

請注意,我用的Apache2的一個單獨的安裝。你的里程可能會有所不同,但我發現在這裏和那裏的安裝件截至2012年7月彙總在這裏...通過配置mod_mono。conf,因爲我有,我現在有一個apache2/mono安裝工作,與apache.org標準apache2安裝。雖然我是蘋果粉絲男孩,但我希望OSX Apache的安裝更加標準。

(1)在OSX上設置Apache2或根據您的偏好使用默認實現。如果您自己構建httpd引擎,請參閱下面的註釋。 (2)獲取mod_mono源文件,並進行編譯,如下所示。 (3)將Apache的httpd.conf配置爲包含mod_mono.conf。 (4)編輯mod_mono.conf以適合您的需求。 (5)重新啓動Apache2。

當構建的apache2被放置在的/ usr /本地/ apache2的: 的./configure前綴=的/ usr /本地/ apache2的--with-包括-APR --enable-MODS的共享=所有--enable-模塊=所以--enable-AuthZ的主機

當建築是mod_mono找到位於/ usr /本地/ Apache2的apache2的: 的./configure --prefix =在/ usr /本地

在OSX 10.7上配置mod_mono時,假定可以通過/ usr/bin訪問mono,就像使用macports mono安裝一樣:

# mod_mono.conf 

# Achtung! This file may be overwritten 
# Use 'include mod_mono.conf' from other configuration file 
# to load mod_mono module. 

<IfModule !mod_mono.c> 
    LoadModule mono_module /usr/local/apache2/modules/mod_mono.so 
</IfModule> 

<IfModule mod_headers.c> 
    Header set X-Powered-By "Mono" 
</IfModule> 

AddType application/x-asp-net .aspx 
AddType application/x-asp-net .asmx 
AddType application/x-asp-net .ashx 
AddType application/x-asp-net .asax 
AddType application/x-asp-net .ascx 
AddType application/x-asp-net .soap 
AddType application/x-asp-net .rem 
AddType application/x-asp-net .axd 
AddType application/x-asp-net .cs 
AddType application/x-asp-net .vb 
AddType application/x-asp-net .master 
AddType application/x-asp-net .sitemap 
AddType application/x-asp-net .resources 
AddType application/x-asp-net .skin 
AddType application/x-asp-net .browser 
AddType application/x-asp-net .webinfo 
AddType application/x-asp-net .resx 
AddType application/x-asp-net .licx 
AddType application/x-asp-net .csproj 
AddType application/x-asp-net .vbproj 
AddType application/x-asp-net .config 
AddType application/x-asp-net .Config 
AddType application/x-asp-net .dll 
DirectoryIndex index.aspx 
DirectoryIndex Default.aspx 
DirectoryIndex default.aspx 

Alias /mono "/Users/tommy/Sites/mono" 
AddMonoApplications default "/mono:/Users/tommy/Sites/mono" 
MonoServerPath **default** "/usr/bin/mod-mono-server4" 
MonoExecutablePath "/usr/bin/mono" 

<Location /mono> 
     MonoSetServerAlias **default** 
     SetHandler mono 
     DirectoryIndex index.aspx 
</Location> 

請注意,httpd.conf文件包含上面顯示的mod_mono.conf文件。

+0

我終於在前一段時間得到單聲道工作,但從未在這裏更新過。問題是mod_wsgi和mod_mono一起工作。使用單獨的apache安裝將(應該)修復我遇到的問題。 – 2012-07-12 04:19:46

1

64位單聲道VM未以運行Apache下64位是mod_mono必需的。看到了自己的「文件」命令輸出(我是獅子10.7.2與Apache 2.2.20,單聲道2.10.8和2.10是mod_mono):

file /usr/bin/mono 
/usr/bin/mono: Mach-O executable i386 

file /usr/libexec/apache2/mod_mono.so 
/usr/libexec/apache2/mod_mono.so: Mach-O 64-bit bundle x86_64 

file /usr/sbin/httpd 
/usr/sbin/httpd: Mach-O universal binary with 2 architectures 
/usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable x86_64 
/usr/sbin/httpd (for architecture i386): Mach-O executable i386 

所以,我有完全相同的輸出如你,正如您所看到的,您必須使用64位mod_mono才能在32位Mono VM的64位Apache下運行ASP.NET頁面。

我想你應該從一開始就再試一次:

  • 下載latest Mono VM(我建議你採取的版本2.10.8,不2.10.8.1因爲這一個不被視爲穩定)
  • 卸載通過在命令行中運行地處MonoFramework-MRE-2.10.8_3.macos10.xamarin.x86.pkg束腳本uninstallMono.sh,該目錄下單的所有先前版本Contents/Resources
  • 通常安裝在單VM
  • 下載latest mod_mono Apache module:您必須確保mod_mono版本匹配單向虛擬機版本
  • 提取您想要的存檔內容並使用以下命令進行編譯(如您所見,我沒有提供任何參數給命令):

    ./configure
    make
    sudo make install

  • 確保你有下面這行你/etc/apache2/httpd.conf文件的末尾:Include /private/etc/apache2/mod_mono.conf

  • 重啓Apache服務器使用以下命令:sudo apachectl restart

這應該工作!如果不是這種情況,請發佈mod_mono編譯的輸出以查看是否發生任何錯誤。還有你的httpd.conf文件:問題可能與另一個與mod_mono衝突的Apache模塊有關。

我建議使用mod_mono.conf文件my own version,因爲它使AutoHosting功能(只與您當前的文化取代MonoSetEnv LANG=fr_FR.UTF-8線,像「EN-US.UTF-8」或「JA-JP.UTF-8」 )。

祝你好運! :O)

+0

更接近!沒有得到mach-o錯誤,只是一個SIGTERM,當我嘗試啓動加載mod_mono配置的Apache。 – 2012-01-13 03:31:58

+0

你的命令與地雷輸出完全相同,所以mod_mono的編譯進行得很順利。也許你可以在「make install」輸出中執行它的建議:'警告:記得運行libtool --finish/usr/local/lib'。這在我的系統中不是必需的,所以我懷疑它解決了你的問題(只有mod_mono的手冊頁安裝在/ usr/local中)。你可以發佈你的「httpd.conf」文件來看看我的有什麼不同嗎?關於你的系統的另一個問題:是Lion的全新安裝還是Snow Leopard的升級? – CedX 2012-01-13 15:28:31

相關問題