Macos 在Mac OSX Lion上安装mod_mono时出现问题

Macos 在Mac OSX Lion上安装mod_mono时出现问题,macos,apache,mono,osx-lion,mod-mono,Macos,Apache,Mono,Osx Lion,Mod Mono,关于在OSX上安装mod_mono,但我假设这是在Lion出现之前,它对开发人员(如python版本)进行了一些突破性的更改 我已经按照mod_mono-2.10安装自述中的说明进行了操作。没用 我所做的就是: 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 /p

关于在OSX上安装mod_mono,但我假设这是在Lion出现之前,它对开发人员(如python版本)进行了一些突破性的更改

我已经按照mod_mono-2.10安装自述中的说明进行了操作。没用

我所做的就是:

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
看来莫迪·莫诺并不是真正的问题。这是莫诺本身

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
mono软件包本身不是为64位编译的。也许我应该读完整本书,但这里有一点主要的担忧:

32位和64位支持

本网站上发布的Mono软件包提供32位Mono虚拟机

仅当您从源代码构建Mono并安装自己的虚拟机副本时,Mono 2.10中的64位虚拟机支持才可用。未来,我们将为用户提供mono和mono64二进制文件

64位支持现在有一些限制,这就是为什么我们没有完全改用它的原因:

我们的Windows.Forms实现使用碳,因此,它不能与64位Mono一起工作。 MonoDevelop使用Carbon进行菜单集成,因此不会在64位虚拟机上运行。 MonoMac绑定尚未移植到64位。 全面支持64位Mono还需要我们提供64位Gtk+堆栈,这将增加大多数用户的下载大小

我试图在i386中重新编译mod_mono,以便它可以在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位版本的mono?我想我可以同时做,但整个过程非常耗时。。我不确定是否要维护官方软件包,以及仅针对测试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
/private/var/log/apache2/error\u日志输出:

[Fri Jan 13 14:28:51 2012][info]删除了PID文件/private/var/run/httpd.PID PID=930

[Fri Jan 13 14:28:51 2012][notice]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

在Apache下运行64位mod_Mono不需要64位Mono VM。查看我自己的文件命令输出我在Lion 10.7.2上使用Apache 2.2.20、Mono 2.10.8和mod_Mono 2.10:

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位Apache和32位mono VM下运行ASP.NET页面,必须使用64位mod_mono

我认为你应该从头再来一次:

下载我建议您使用版本2.10.8,而不是2.10.8.1,因为这一版本不稳定 通过在命令行中运行位于目录/Resources下的MonoFramework-MRE-2.10.8_3.macos10.xamarin.x86.pkg捆绑包中的脚本uninstallMono.sh,卸载所有以前版本的Mono 正常安装Mono虚拟机 下载:您必须确保mod_mono版本与mono VM版本匹配 在需要的地方提取归档文件的内容,并使用以下命令进行编译,如您所见,我没有为这些命令提供任何参数:

/配置 制作 sudo制作安装

确保在/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文件,因为它启用了该功能,只需将MonoSetEnv LANG=fr_fr.UTF-8行替换为您当前的区域性,如en-US.UTF-8或ja-JP.UTF-8


祝你好运o在Apache下运行64位mod_Mono不需要64位Mono VM。查看我自己的文件命令输出我在Lion 10.7.2上使用Apache 2.2.20、Mono 2.10.8和mod_Mono 2.10:

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位Apache和32位mono VM下运行ASP.NET页面,必须使用64位mod_mono

我认为你应该从头再来一次:

下载我建议您使用版本2.10.8,而不是2.10.8.1,因为这一版本不稳定 通过在命令行中运行位于目录/Resources下的MonoFramework-MRE-2.10.8_3.macos10.xamarin.x86.pkg捆绑包中的脚本uninstallMono.sh,卸载所有以前版本的Mono 正常安装Mono虚拟机 下载:您必须确保mod_mono版本与mono VM版本匹配 在需要的地方提取归档文件的内容,并使用以下命令进行编译,如您所见,我没有为这些命令提供任何参数:< /p> /配置 制作 sudo制作安装

确保在/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文件,因为它启用了该功能,只需将MonoSetEnv LANG=fr_fr.UTF-8行替换为您当前的区域性,如en-US.UTF-8或ja-JP.UTF-8


祝你好运o

以下是我在OSX 10.7、Apache2上设置mono/mod_mono所做的工作-希望它能为其他人节省一些步骤

请注意,我使用了单独安装的apache2。您的里程数可能会有所不同,但我在这里和那里找到了截至2012年7月在这里汇总的安装片段。。。通过像我一样配置mod_mono.conf,我现在有了一个可以正常工作的apache2/mono安装,还有一个apache2安装,它是apache.org的标准安装。虽然我是一个苹果迷,但我希望OSX Apache安装的形式更标准一些

1在OSX上设置Apache2或根据您的喜好使用默认实现。如果您自己构建httpd引擎,请参见下面的注释。 2获取mod_mono源代码,并按如下所示编译。 3配置Apache的httpd.conf以包括mod_mono.conf。 4编辑mod_mono.conf以满足您的需要。 5重新启动Apache2

将apache2建在/usr/local/apache2时: ./configure-prefix=/usr/local/apache2-随附apr-启用mods shared=all-启用模块=so-启用authz主机

在构建mod_mono以在/usr/local/apache2上查找apache2时: ./configure-prefix=/usr/local

在OSX 10.7上配置mod_mono时,假设可以通过macports mono安装通过/usr/bin访问mono:


请注意,httpd.conf文件包括上面显示的mod_mono.conf文件。

以下是我在OSX 10.7、Apache2上设置mono/mod_mono所做的工作-希望它能为其他人节省一些步骤

请注意,我使用了单独安装的apache2。您的里程数可能会有所不同,但我在这里和那里找到了截至2012年7月在这里汇总的安装片段。。。通过像我一样配置mod_mono.conf,我现在有了一个可以正常工作的apache2/mono安装,还有一个apache2安装,它是apache.org的标准安装。虽然我是一个苹果迷,但我希望OSX Apache安装的形式更标准一些

1在OSX上设置Apache2或根据您的喜好使用默认实现。如果您自己构建httpd引擎,请参见下面的注释。 2获取mod_mono源代码,并按如下所示编译。 3配置Apache的httpd.conf以包括mod_mono.conf。 4编辑mod_mono.conf以满足您的需要。 5重新启动Apache2

将apache2建在/usr/local/apache2时: ./configure-prefix=/usr/local/apache2-随附apr-启用mods shared=all-启用模块=so-启用authz主机

在构建mod_mono以在/usr/local/apache2上查找apache2时: ./configure-prefix=/usr/local

在OSX 10.7上配置mod_mono时,假设可以通过macports mono安装通过/usr/bin访问mono:


请注意,httpd.conf文件包括上面显示的mod_mono.conf文件。

我会检查apache错误日志,看看是否有任何错误。@Rolf,at/var/log/apache/error_log?Apache甚至还没有启动,所以不幸的是在日志中找不到任何东西。看起来您的Apache是为64位编译的,而mod_mono是为x86编译的。@Rolf,是的,现在知道了。我会尝试重新编译,如果结果有效,我会将其作为答案发布。我会检查apache错误日志,看看是否有任何错误。@Rolf,at/var/log/apache/error\u log?Apache甚至还没有启动,所以不幸的是在日志中找不到任何东西。看起来您的Apache是为64位编译的,而mod_mono是为x86编译的。@Rolf,是的,现在知道了。我将尝试重新编译,如果结果更接近,我会将其作为答案发布!不再出现mach-o错误,当我尝试在加载mod_mono配置的情况下启动apache时,只是一个SIGTERM。您的命令与我的命令具有完全相同的输出,因此mod_mono的编译进行得很顺利。也许您可以按照makeinstall输出中的建议执行:警告:记住运行libtool-finish/usr/local/lib。我的系统不需要它,所以我怀疑它能解决您的问题,只是mod_mono的手册页安装在/usr/local中。你能发布你的httpd.conf文件看看和我的有什么不同吗?关于您的系统的另一个问题:它是新安装的Lion,还是从SnowLeopard升级的?更接近!不再出现mach-o错误,当我尝试在加载mod_mono config的情况下启动apache时,只是一个SIGTERM
mod_mono的治疗进展顺利。也许您可以按照makeinstall输出中的建议执行:警告:记住运行libtool-finish/usr/local/lib。我的系统不需要它,所以我怀疑它能解决您的问题,只是mod_mono的手册页安装在/usr/local中。你能发布你的httpd.conf文件看看和我的有什么不同吗?关于你的系统的另一个问题是:它是新安装的Lion,还是从SnowLeopard升级而来的?我不久前终于让mono工作了,但在这里从未更新过。问题是mod_wsgi和mod_mono协同工作。使用一个单独的apache安装将修复我遇到的问题。我终于在不久前让mono工作了,但从未在这里更新过。问题是mod_wsgi和mod_mono协同工作。使用单独的apache安装将修复我遇到的问题。