麻烦在Mac OSX狮子上安装的是mod_mono [英] Trouble installing mod_mono on Mac OSX Lion

查看:234
本文介绍了麻烦在Mac OSX狮子上安装的是mod_mono的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关于OSX上安装的是mod_mono另一个问题,但我我要去假设那是以前狮子来了一下,其中有开发者一些重大变化(如Python版本)。

我跟着是mod_mono 2.10的INSTALL自述文件的说明。没有结果。

正是我所做的是这样的:

 焦油xvfz是mod_mono-2.10.tar.gz
CD是mod_mono - X.Y.Z
的./configure - preFIX =的/ usr
使
使安装$ apachectl中-t
httpd的:对/private/etc/apache2/other/mod_mono.conf第8行语法错误:在/private/etc/apache2/httpd.conf 54行语法错误无法加载/usr/libexec/apache2/mod_mono.so到服务器:
的dlopen(/usr/libexec/apache2/mod_mono.so,10):未找到合适的图像。没有找到:\\ n \\ t在/ usr / libexec中/的Apache2 / mod_mono.so:Mach-O的,但错误的体系结构

看样子,是mod_mono是不是真正的问题。它是单声道本身。

  smeatonj $文件的/ usr / bin中/单
在/ usr /斌/单声道:Mach-O的可执行程序的i386
smeatonj $文件/usr/libexec/apache2/mod_mono.so
/usr/libexec/apache2/mod_mono.so:Mach-O的64位x86_64的包
meatonj $文件/ usr / sbin目录/的httpd
/ usr / sbin目录/的httpd:Mach-O的通用二进制2架构
/ usr / sbin目录/的httpd(用于建筑x86_64的):Mach-O的64位可执行文件x86_64的
/ usr / sbin目录/的httpd(用于i386硬件架构)的Mach-O可执行i386的
smeatonj $文件的/ usr / bin中/单
在/ usr /斌/单声道:Mach-O的可执行程序的i386

在单包本身不编译为64位。也许我应该有充分阅读安装指南但这里是主要的位关注:


  

32位和64位支持


  
  

在本网站上发布的单包提供32位单声道的虚拟机。


  
  

支持64位虚拟机为单声道2.10,如果你从源代码code建单声道和安装你自己的虚拟机副本才可用。在未来,我们将推出单声道和mono64二进制文件为我们的用户。


  
  

64位支持今天一些限制这就是为什么我们还没有完全切换到它:


  
  

我们的Windows.Forms的实现使用碳,正因为如此,它不会与一个64位的单声道工作。
  MonoDevelop的碳使用其菜单集成这样就不会在64位虚拟机上运行。
  MonoMac绑定还没有被移植到64位。
  全线支持64位单声道也要求我们推出一款64位GTK +叠加,这会增加对于大多数用户下载大小。


我试图重新编译是mod_mono在i386的,以便它可以与单声道的运行时运行

 须藤-s
CFLAGS = - 拱i386下的./configure - preFIX =的/ usr
使
使安装smeatonj $文件/usr/libexec/apache2/mod_mono.so
/usr/libexec/apache2/mod_mono.so:Mach-O的捆绑I386

同样的问题:

  $ apachectl中-t
httpd的:对/private/etc/apache2/other/mod_mono.conf第8行语法错误:在/private/etc/apache2/httpd.conf 54行语法错误无法加载/usr/libexec/apache2/mod_mono.so到服务器:
的dlopen(/usr/libexec/apache2/mod_mono.so,10):未找到合适的图像。没有找到:\\ n \\ t在/ usr / libexec中/的Apache2 / mod_mono.so:Mach-O的,但错误的体系结构

我该怎么能够在运行Apache是​​mod_mono无需编译和安装单的64位版本?我想我能做到这一点并排的一面,但整个过程已经非常非常费时...我不知道维持官方包,和不同的版本只是一个测试网络服务器。

下面是是mod_mono最新重新编译的确切端子输出:

 乔什 - 麦克:是mod_mono 2.10 smeatonj $的./configure
检查一个BSD兼容安装...在/ usr /斌/安装-c
检查编译环境是否健全......是的
检查一个线程安全的mkdir -p ... ./install-sh -c -d
检查GAWK ...没有
检查mawk ...没有
检查NAWK ...没有
检查AWK AWK ...
检查是否化妆套$(MAKE)......是的
检查GCC海湾合作委员会...
检查C编译器默认的输出文件名的a.out ...
检查C编译器是否工作......是的
检查我们是否交叉编译...没有
检查可执行文件后缀...
检查对象文件后缀... O
检查我们是否使用GNU C编译器......是的
海湾合作委员会检查是否接受-g ......是的
gcc的选项检查接受ISO C89 ...没有必要
检查包括使用的化妆风格... GNU
检查GCC的依赖风格...的gcc3
检查创建系统类型... I386-苹果darwin11.2.0
检查主机系统类型... I386-苹果darwin11.2.0
检查一个sed不截断输出...的/ usr / bin中/ sed的
检查grep的处理排长和-e ...在/ usr /斌/ grep的
检查egrep的...在/ usr /斌/ grep的-E
检查fgrep一样......在/ usr /斌/ grep的-F
检查GCC使用LD ... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
检查是否连接器(/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld)是GNU LD ...没有
检查BSD-或MS-兼容名称利斯特(NM)...在/ usr /斌/纳米
检查名称李斯特(在/ usr /斌/ nm)的接口... BSD纳米
检查是否LN -s作品......是的
检查命令行参数的最大长度... 196608
检查外壳是否理解一些XSI结构......是的
检查外壳是否理解+ =...是的
检查/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld选项重新加载目标文件-r ...
检查objdump的...没有
检查如何识别依赖库... pass_all
检查AR AR ...
检查带带...
检查ranlib处理... ranlib处理
检查命令来分析从GCC对象USR斌输出/ / /纳米... OK
检查dsymutil ... dsymutil
检查nmedit ... nmedit
检查脂脂...
检查otool ... otool
检查otool64 ...没有
检查-single_module链接器标志......是的
检查-exported_symbols_list链接器标志......是的
检查如何运行C preprocessor ​​... gcc的-E
检查的ANSI C头文件...是的
检查SYS / types.h中......是的
检查SYS / stat.h ...是的
检查文件stdlib.h ...是的
检查string.h中...是的
检查memory.h ...是的
检查strings.h ...是的
检查inttypes.h ...是的
检查stdint.h ...是的
检查unistd.h中...是的
检查dlfcn.h中...是的
检查objdir ...的.libs
检查是否GCC支持-fno-RTTI -fno-例外...没有
检查GCC选项生成PIC ... -fno常见-DPIC
检查是否gcc的PIC标志-fno常见-DPIC工作......是的
检查是否GCC静态标志-static作品...没有
检查是否GCC支持-c -o file.o ......是的
检查是否GCC支持-c -o file.o ...(缓存)是
检查gcc的链接(/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld)是否支持共享库......是的
检查动态连接器的特性...... darwin11.2.0 dyld的
检查如何辛苦code库的路径到程序中...立即
检查是否剥离库可能......是的
检查是否libtool的支持共享库......是的
检查是否建立共享库......是的
检查是否建立静态库......是的
检查字节顺序是否为bigEndian ...没有
检查pkg配置...的/ usr / bin中/ pkg配置
检查SYS / wait.h即POSIX.1兼容......是的
检查netdb.h中的可用性...是的
检查netdb.h中presence ......是的
检查netdb.h中...是的
检查unistd.h中...(缓存)是
检查的ANSI C-符合const的......是的
检查将为pid_t ...是的
检查为size_t ...是的
检查是否time.h中和sys / time.h中可能都被列入......是的
检查vfork.h可用性...没有
检查vfork.h presence ...没有
检查vfork.h ...没有
检查叉...是的
检查的vfork ...是的
检查工作叉...是的
检查工作的vfork ...(缓存)是
检查的ANSI C头文件...(缓存)是
检查SYS / select.h可用性...是
检查SYS / select.h presence ......是的
检查SYS / select.h ......是的
检查SYS / socket.h中的可用性...是
检查SYS / socket.h中presence ......是的
检查SYS / socket.h中......是的
检查类型的选择... INT,FD_SET * timeval结构参数*
检查memset的...是的
检查的mkdir ...是的
检查unsetenv ...是的
检查传给putenv ...是的
检查SETENV ...是的
检查了setrlimit ...是的
检查选择...是的
检查strcasecmp ...是的
检查字符串错误...是的
检查strrchr ...是的
检查dup2 ...是的
检查strndup ...是的
检查,如果被请求调试模式......不
检查什么级别的调试消息应印在...调试输出禁用
检查是mod_mono是否应该从环境中删除DISPLAY变量...没有
检查如果请求的gcov编译...没有
检查是否请求gprof的支持......不
在/ usr /本地/ Apache2的/ sbin目录...检查apxs2没有
检查在/ usr /本地/ Apache2的/ sbin目录...没有APXS
在/ usr /本地/ Apache2的/ bin中检查apxs2 ...没有
检查在/ usr /本地/ Apache2的/ bin中APXS ...没有
在/ usr /本地/ Apache检查apxs2 / sbin目录...没有
检查在/ usr /本地/ Apache APXS / sbin目录...没有
在/ usr /本地/ Apache / bin中检查apxs2 ...没有
检查在/ usr /本地/ Apache / bin中APXS ...没有
检查在/ usr / sbin目录... apxs2没有
检查在/ usr / sbin目录... / usr / sbin目录/ apxs的APXS
检查在/ usr / sbin目录...没有APR-1配置
检查在/ usr / sbin目录...没有APR-配置
在/ usr /本地/ Apache2的/ sbin目录...检查APR-1配置无
在/ usr /本地/ Apache2的/ sbin目录...检查APR-配置无
在/ usr /本地/ Apache2的/ bin中检查APR-1配置...没有
在/ usr /本地/ Apache2的/ bin中检查APR-配置...没有
检查在/ usr /本地/ Apache APR-1配置/ sbin目录...没有
检查在/ usr /本地/ Apache APR-配置/ sbin目录...没有
在/ usr /本地/ Apache / bin中检查APR-1配置...没有
在/ usr /本地/ Apache / bin中检查APR-配置...没有
检查在/ usr / sbin目录...没有APR-1配置
检查在/ usr / sbin目录...没有APR-配置
检查在/ usr / bin中APR-1配置...找到。
检查APU-1配置在/ usr / sbin目录...没有
检查在/ usr / sbin目录... APU,配置无
检查APU-1配置在/ usr /本地/ Apache2的/ sbin目录...没有
在/ usr /本地/ Apache2的/ sbin目录...检查APU,配置无
在/ usr /本地/ Apache2的/ bin中检查APU-1配置...没有
在/ usr /本地/ Apache2的/ bin中检查的APU配置...没有
检查APU-1配置在/ usr /本地/ Apache / sbin目录...没有
在/ usr /本地/ Apache检查APU-配置/ sbin目录...没有
检查在/ usr /本地/ Apache / bin中APU-1配置...没有
在/ usr /本地/ Apache / bin中检查的APU配置...没有
检查APU-1配置在/ usr / sbin目录...没有
检查在/ usr / sbin目录... APU,配置无
检查在/ usr / bin中APU-1配置...找到。
检查Apache的版本2.2 ...
检查http_protocol.h ...是的
配置:创建./config.status
config.status:创建的Makefile
config.status:创建mod_mono.conf
config.status:创建的src / Makefile文件
config.status:创建人/ mod_mono.8
config.status:创建人/ Makefile文件
config.status:创建包括/ mod_mono_config.h
config.status:执行命令depfiles
config.status:执行命令的libtool
config.status:执行命令安静
./config.status:行2068:./scripts/patch-quiet.sh:没有这样的文件或目录
config.status:执行静默libtool的命令
---
对于是mod_mono配置摘要   *安装preFIX =的/ usr /本地
   * Apache的版本= 2.2
   * Apache的modules目录=的/ usr / libexec中/ Apache2的
   * APXS = / usr / sbin目录/ APXS
   * APR-配置=的/ usr / bin中/ APR-1配置
   * APU-配置=的/ usr / bin中/ APU-1配置
   * CFLAGS = -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1
   *详细记录(调试)=无
   * gcov的选项用于=无
   *分析已启用=否
   *单preFIX = /Library/Frameworks/Mono.framework/Versions/2.10.8
   *默认MonoApplicationsConfigDir = /私人的/ etc / apache2的/ MOD-单应用程序---
约什 - 麦克:是mod_mono 2.10 smeatonj $化妆
使所有在SRC
/ bin / sh的../libtool --tag = CC --mode =编译的gcc -DHAVE_CONFIG_H -I。 -I ../包括-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ Apache2的-g -O2 -I / usr / include目录/ Apache2的-I / USR /本地/包括-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I / usr / include目录/ APR -1 -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-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`测试-f是mod_mono。 C'||回声./'`mod_mono.c
libtool的:编译:gcc的-I -DHAVE_CONFIG_H。 -I ../包括-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ Apache2的-g -O2 -I / usr / include目录/ Apache2的-I / USR /本地/包括-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I / usr / include目录/ APR -1 -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-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常见-DPIC -o的.libs / mod_mono_la-mod_mono.o
libtool的:编译:gcc的-I -DHAVE_CONFIG_H。 -I ../包括-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ Apache2的-g -O2 -I / usr / include目录/ Apache2的-I / USR /本地/包括-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I / usr / include目录/ APR -1 -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-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 =编译的gcc -DHAVE_CONFIG_H -I。 -I ../包括-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ Apache2的-g -O2 -I / usr / include目录/ Apache2的-I / USR /本地/包括-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I / usr / include目录/ APR -1 -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -MT mod_mono_la单声道-IO-portability.lo -MD -MP -MF .deps / mod_mono_la-单IO-portability.Tpo -c -o mod_mono_la单 - IO-portability.lo`测试-f'单IO-portability.c'||回声./'`mono-io-portability.c
libtool的:编译:gcc的-I -DHAVE_CONFIG_H。 -I ../包括-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ Apache2的-g -O2 -I / usr / include目录/ Apache2的-I / USR /本地/包括-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I / usr / include目录/ APR -1 -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -MT mod_mono_la单声道-IO-portability.lo -MD -MP -MF .deps / mod_mono_la-单IO-portability.Tpo -c单IO-可移植性。 ç-fno常见-DPIC -o的.libs / mod_mono_la-单IO-portability.o
libtool的:编译:gcc的-I -DHAVE_CONFIG_H。 -I ../包括-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ Apache2的-g -O2 -I / usr / include目录/ Apache2的-I / USR /本地/包括-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I / usr / include目录/ APR -1 -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -MT mod_mono_la单声道-IO-portability.lo -MD -MP -MF .deps / mod_mono_la-单IO-portability.Tpo -c单IO-可移植性。 ç-o mod_mono_la-单IO-portability.o>的/ dev / null的2 - ;&放大器; 1
MV -f .deps / mod_mono_la-单IO-portability.Tpo .deps / mod_mono_la-单IO-portability.Plo
/ bin / sh的../libtool --tag = CC --mode =编译的gcc -DHAVE_CONFIG_H -I。 -I ../包括-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ Apache2的-g -O2 -I / usr / include目录/ Apache2的-I / USR /本地/包括-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I / usr / include目录/ APR -1 -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-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`测试-f'glib_compat。 C'||回声./'`glib_compat.c
libtool的:编译:gcc的-I -DHAVE_CONFIG_H。 -I ../包括-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ Apache2的-g -O2 -I / usr / include目录/ Apache2的-I / USR /本地/包括-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I / usr / include目录/ APR -1 -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-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常见-DPIC -o的.libs / mod_mono_la-glib_compat.o
libtool的:编译:gcc的-I -DHAVE_CONFIG_H。 -I ../包括-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ APR-1 -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -I / usr / include目录/ Apache2的-g -O2 -I / usr / include目录/ Apache2的-I / USR /本地/包括-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-I / usr / include目录/ APR-1 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I / usr / include目录/ APR -1 -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-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 =链接的gcc -Wall -DDFLT_MONO_CONFIG_DIR = \\/私人的/ etc / apache2的/ MOD-单应用程序\\-g -O2 -I / usr / include目录/ Apache2的-I在/ usr /本地/包括-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-单IO-portability.lo mod_mono_la-glib_compat.lo
libtool的:链接:gcc的轮候册,-undefined轮候册,dynamic_lookup -o的.libs / mod_mono.0.so -bundle的.libs / mod_mono_la-mod_mono.o的.libs / mod_mono_la-单IO-portability.o的.libs / mod_mono_la -glib_compat.o
libtool的:链接:dsymutil的.libs / mod_mono.0.so || :
libtool的:链接:(CD的.libs&放大器;&安培; RM -fmod_mono.so&放大器;&安培; LN -smod_mono.0.somod_mono.so)
libtool的:链接:AR CRU的.libs / mod_mono.a mod_mono_la-mod_mono.o mod_mono_la-单IO-portability.o mod_mono_la-glib_compat.o
libtool的:链接:ranlib处理的.libs / mod_mono.a
libtool的:链接:(CD的.libs&放大器;&安培; RM -fmod_mono.la&放大器;&安培; LN -s../mod_mono.lamod_mono.la)
使所有在人
使[1]:为所有的''做什么也没有。
使[1]:为`全时'做什么也没有。
约什 - 麦克:是mod_mono 2.10 smeatonj $ sudo的安装制作
使安装在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单mod_mono.la
/usr/share/httpd/build/instdso.sh SH_LIBTOOL ='的/ usr /共享/ APR-1 /编译-1 / libtool的mod_mono.la在/ usr / libexec中/ Apache2的
在/ usr /共享/ APR-1 /编译-1 / libtool的--mode =安装CP mod_mono.la在/ usr / libexec目录/ apache2的/
libtool的:安装:CP的.libs / mod_mono.0.so /usr/libexec/apache2/mod_mono.0.so
libtool的:安装:(CD的/ usr / libexec中/ Apache2的&放大器;&安培; {LN -s -f mod_mono.0.so mod_mono.so || {RM -f mod_mono.so&放大器;&安培; LN -s mod_mono.0。所以mod_mono.so;};})
libtool的:安装:CP的.libs / mod_mono.lai /usr/libexec/apache2/mod_mono.la
libtool的:安装:CP的.libs / mod_mono.a /usr/libexec/apache2/mod_mono.a
libtool的:安装权限:chmod 644 /usr/libexec/apache2/mod_mono.a
libtool的:安装:ranlib的/usr/libexec/apache2/mod_mono.a
libtool的:安装:警告:记得运行`libtool的--finish在/ usr / local / lib目录
行chmod 755 /usr/libexec/apache2/mod_mono.so
使安装在人
使[2]:为`安装-EXEC-AM'做什么也没有。
测试-z在/ usr /本地/共享/人/ man8|| .././install-sh -c -d在/ usr /本地/共享/人/ man8
 在/ usr /斌/安装-c -m 644'./mod_mono.8'/usr/local/share/man/man8/mod_mono.8
使[2]:为`安装-EXEC-AM'做什么也没有。
测试-z/私人的/ etc / apache2的|| ./install-sh -c -d/私人的/ etc / apache2的
 在/ usr /斌/安装-c -m 644'mod_mono.conf'/private/etc/apache2/mod_mono.conf
约什 - 麦克:是mod_mono 2.10 smeatonj $约什 - 麦克:Apache2的smeatonj $ sudo的apachectl中-t
httpd的:无法可靠地确定了服务器的完全合格的域名,用约什 - Mac.local对于ServerName
语法OK
约什 - 麦克:Apache2的smeatonj $ sudo的apachectl中重启


  

/私营/无功/日志/的Apache2 / error_log中输出:


  
  

[周五1月13日14时28分51秒2012] [信息]中删除PID文件/private/var/run/httpd.pid(PID = 930)


  
  

[周五1月13日14时28分51秒2012] [声明]抓SIGTERM,关停


我也有安装的mod_wsgi(唯一的其他非标准模块),但我禁用了这个完全,仍能获得SIGTERM。

有在控制台中生成一个错误:

  13/01/12 3:22:50.793 PM org.apache.httpd:httpd的:语法上/private/etc/apache2/httpd.conf的73行错误:语法错误在/private/etc/apache2/mod_mono.conf第8行:无法加载/usr/libexec/apache2/mod_mono.so到服务器:的dlopen(/usr/libexec/apache2/mod_mono.so,10):没有合适的图像发现。没有找到:\\ n \\ t在/ usr / libexec中/的Apache2 / mod_mono.so:Mach-O的,但错误的体系结构


解决方案

下面是我做过什么设置单声道/是mod_mono在OSX 10.7,Apache2的 - 希望这样可以节省别人几步

请注意,我用的Apache2单独安装。您的里程可能会有所不同,但我发现这里和那里将安装在这里聚集截至2012年七月的作品......通过配置mod_mono.conf因为我有,我现在有一个的Apache2 /单声道安装工程,与安装的Apache2即从apache.org标准。虽然我是一个苹果迷的男孩,我希望OSX的Apache的安装是在一个多一点的标准格式。

(1)设置的Apache2在OSX或使用默认实现按您的preference。如果你自己构建的httpd引擎,见下面的评论。
(2)获取是mod_mono源,并编译如下所示。
(3)配置Apache的httpd.conf包括mod_mono.conf。
(4)编辑mod_mono.conf满足您的需求。
(5)重新启动的Apache2。

当Apache2的建设要放在位于/ usr /本地/ Apache2的:
的./configure - preFIX =的/ usr /本地/ Apache2的--with-包括-APR --enable-MODS共享=所有--enable-模块=所以--enable-AuthZ的主机

在构建是mod_mono找到位于/ usr /本地/ Apache2的apache2的:
的./configure - preFIX =的/ usr /本地

当OSX 10.7配置是mod_mono假设单通过的/ usr / bin中访问作为一个单声道MacPorts的安装:

 #mod_mono.conf#ACHTUNG!该文件可能会被覆盖
#使用包括mod_mono.conf从其他配置文件
#加载是mod_mono模块。<!IfModule mod_mono.c>
    的LoadModule mono_module /usr/local/apache2/modules/mod_mono.so
< / IfModule>< IfModule mod_headers.c>
    头集合X供电,由单声道
< / IfModule>将AddType应用程序/ x-ASP网的.aspx
将AddType应用程序/ x-ASP网的.asmx
将AddType应用程序/ x-ASP网.ashx的
将AddType应用程序/ x-ASP网的.asax
将AddType应用程序/ x-ASP网的.ascx
将AddType应用程序/ x-ASP网.soap
将AddType应用程序/ x-ASP网.rem
将AddType应用程序/ x-ASP净个.axd
将AddType应用程序/ x-ASP网的.cs
将AddType应用程序/ x-ASP网的.vb
将AddType应用程序/ x-ASP网的.master
将AddType应用程序/ x-ASP网.sitemap
将AddType应用程序/ x-ASP网的.resources
将AddType应用程序/ x-ASP网。皮肤
将AddType应用程序/ x-ASP网.browser
将AddType应用程序/ x-ASP网.webinfo
将AddType应用程序/ x-ASP网的.resx
将AddType应用程序/ x-ASP网.licx
将AddType应用程序/ x-ASP网的.csproj
将AddType应用程序/ x-ASP网.vbproj
将AddType应用程序/ x-ASP网的.config
将AddType应用程序/ x-ASP网.CONFIG
将AddType应用程序/ x-ASP网.DLL
的DirectoryIndex的Index.aspx
的DirectoryIndex的Default.aspx
的DirectoryIndex的Default.aspx别名/单声道/用户/汤米/网站/单声道
AddMonoApplications默认/单声道:/用户/汤米/网站/单声道
MonoServerPath ** **默认的/ usr / bin中/ MOD-单服务器4
MonoExecutablePath的/ usr / bin中/单声道<位置/单>
      MonoSetServerAlias​​ ** **默认
      SetHandler单
      的DirectoryIndex的Index.aspx
< /地点>

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

There is another question regarding installing mod_mono on OSX, but I'm going to assume that was before Lion came about, which had some breaking changes for developers (like python versions).

I've followed the instructions in the INSTALL readme of mod_mono-2.10. No Avail.

Exactly what I've done is this:

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

It appears that mod_mono wasn't really the problem. It was mono itself.

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

The mono package itself is not compiled for 64 bit. Perhaps I should have fully read the install guide but here is the main bit of concern:

32 and 64 bit support

The Mono packages published on this web site provide a 32-bit Mono VM.

Support for 64-bit VMs as of Mono 2.10 is only available if you build Mono from source code and install your own copy of the VM. In the future we will ship both mono and mono64 binaries for our users.

The 64 bit support has a few limitations today which is why we have not entirely switched to it:

Our Windows.Forms implementation uses Carbon, and as such, it would not work with a 64-bit Mono. MonoDevelop uses Carbon for its menu integration so it would not run on a 64-bit VM. MonoMac bindings have not been ported to 64 bits. Supporting 64-bit Mono across the board would also require us to ship a 64-bit Gtk+ stack and that would increase the download size for most users.

I attempted to recompile mod_mono in i386 so that it can run with the mono runtime

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

Same problem:

$ 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

Am I going to be able to run mod_mono on apache without compiling and installing a 64 bit version of mono? I guess I could do it side-by-side, but this whole process has been very very time consuming.. I'm not sure about maintaining the official package, and a different version just for a test webserver.

Here is the exact terminal output for the latest recompilation of 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_log output:

[Fri Jan 13 14:28:51 2012] [info] removed PID file /private/var/run/httpd.pid (pid=930)

[Fri Jan 13 14:28:51 2012] [notice] caught SIGTERM, shutting down

I also have mod_wsgi installed (the only other non-standard module), but I disabled that entirely, and still get the SIGTERM.

There is an error being generated in Console:

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

解决方案

Here is what I did to set up mono/mod_mono on OSX 10.7, Apache2 - hopefully it saves someone else a few steps.

Note that I used a separate install of apache2. Your mileage may vary, but I have found pieces of installs here and there that are aggregated here as of Jul 2012 ... By configuring mod_mono.conf as I have, I now have an apache2/mono install that works, with an apache2 install that is standard from apache.org. While I am an Apple fan boy, I wish the OSX Apache installations were in a little more standard form.

(1) Set up Apache2 on OSX or use the default implementation as per your preference. If you build the httpd engine yourself, see commentary below. (2) Get mod_mono source, and compile as shown below. (3) Configure Apache's httpd.conf to include mod_mono.conf. (4) Edit the mod_mono.conf to fit your needs. (5) Restart Apache2.

When building apache2 to be placed at /usr/local/apache2: ./configure --prefix=/usr/local/apache2 --with-included-apr --enable-mods-shared=all --enable-module=so --enable-authz-host

When building mod_mono to find apache2 at /usr/local/apache2: ./configure --prefix=/usr/local

When configuring mod_mono on OSX 10.7 assuming that mono is accessible through /usr/bin as with a macports mono install:

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

Note that the httpd.conf file includes the mod_mono.conf file shown above.

这篇关于麻烦在Mac OSX狮子上安装的是mod_mono的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆