2012-01-11 5 views
1

There is another question OSX에서 mod_mono를 설치하는 데는 문제가 있지만 개발자 (예 : Python 버전)에 대한 몇 가지 중요한 변경 사항이있는 Lion이 등장하기 전에 있었던 것으로 가정합니다.Mac OSX Lion에서 mod_mono를 설치하는 데 문제가 발생했습니다.

나는 mod_mono-2.10의 INSTALL readme에있는 지침을 따라왔다. 사용할 수 없음.

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 비트 모노 VM을 제공하는이 웹 사이트에 게시 된 모노 패키지.

Mono 2.10에서의 64 비트 VM 지원은 소스 코드에서 Mono를 빌드하고 사용자 자신의 VM 사본을 설치하는 경우에만 사용할 수 있습니다. 앞으로는 사용자를 위해 mono 및 mono64 바이너리를 모두 제공 할 예정입니다.

우리의 Windows.Forms 구현이 탄소를 사용하고, 같은, 그것은 64 비트 모노와 함께 작동하지 않을 것입니다 :

64 비트 지원은 우리가 완전히 전환하지 않은 이유는 오늘 몇 가지 제한이있다 . MonoDevelop는 메뉴 통합을 위해 Carbon을 사용하므로 64 비트 VM에서 실행되지 않습니다. MonoMac 바인딩은 64 비트로 이식되지 않았습니다. 보드 전체에 걸쳐 64 비트 모노를 지원하려면 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 

나는 아파치에 mod_mono 실행할 수 하겠어 64 비트 버전의 모노를 컴파일하고 설치하지 않고도? 나는 그것을 나란히 할 수 있다고 생각하지만,이 전체 과정은 매우 시간이 많이 걸렸다. 공식 패키지와 테스트 웹 서버를위한 다른 버전을 유지하는 것에 대해서는 확신 할 수 없다. 여기

는 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 

개인 /는/var/log/아파치/출력의 error_log :

[금 일월 14시 28분 13 : 51 2012] [info] 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: 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

나는 거기에 오류가 있는지 아파치 오류 로그를 확인합니다. –

+0

@Rolf,/var/log/apache/error_log? 아파치는 시작조차하지 않으므로 불행히도 그 로그에서 찾을 수있는 것이 없다. –

+0

아파치가 64 비트 용으로 컴파일 된 것처럼 보이지만 mod_mono는 x86 용으로 컴파일됩니다. –

답변

3

다음은 OSX 10.7, Apache2에서 mono/mod_mono를 설정 한 것입니다. 다른 사람이 몇 단계 만 저장하면되기를 바랍니다.

apache2를 별도로 설치했음을 유의하십시오. 귀하의 마일리지는 다를 수 있지만 2012 년 7 월 현재 여기에 집계 된 설치물이 있습니다 ... mod_mono를 구성하십시오.conf를 가지고있는 것처럼, apache2/mono를 설치하면 apache.org의 표준 인 apache2가 설치됩니다. 필자는 Apple 팬 이었지만 OSX Apache 설치는 좀 더 표준적인 형식 이었으면합니다.

(1) OSX에서 Apache2를 설정하거나 기본 설정대로 사용하십시오. httpd 엔진을 직접 제작한다면 아래의 해설을보십시오. (2) mod_mono 소스를 가져 와서 아래와 같이 컴파일하십시오. (3) mod_mono.conf를 포함하도록 Apache의 httpd.conf를 구성하십시오. (4) 필요에 맞게 mod_mono.conf를 편집하십시오. (5) Apache2를 다시 시작하십시오.

아파치 건물

은/usr/지방/아파치 배치한다 : ./configure를 --prefix =/usr/지방/--with 포함 4 월 --enable-개조가 공유 아파치 = 모든 --enable 모듈 = SO-에는 AuthZ 호스트 --enable

mod_mono은/usr/지방/아파치 아파치에서 찾을 건물 : ./configure를 --prefix =/usr/지방

OSX 10.7에서 mod_mono를 구성 할 때 macports mono 설치와 같이 mono가/usr/bin을 통해 액세스 할 수 있다고 가정하면 :

# 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가 함께 작동하는 것입니다. 아파치를 별도로 설치하면 문제가 해결됩니다. –

1

64 비트 모노 VM이 아파치에서 64 비트 mod_mono을 실행하기 위해 필요하지 않습니다 :

콘솔에서 생성되는 오류가 있습니다. (아파치 2.2.20, 모노 2.10.8와 사자 10.7.2에있어 및 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 비트 Apache에서 32 비트 Mono VM을 사용하여 ASP.NET 페이지를 실행하려면 64 비트 mod_mono를 사용해야합니다.

  • 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을 정상적으로 설치
  • 다운로드 012,319,592,: mod_mono 버전이 Mono VM 버전과 일치하는지 확인해야합니다.
  • 원하는 위치에 아카이브 내용을 추출하고 다음 명령을 사용하여 컴파일하십시오 (명령에 인수를 제공하지 않음).

    sudo apachectl restart
  • : 다음 명령을 Include /private/etc/apache2/mod_mono.conf

  • 를 다시 시작 아파치 서버 :

    ./configure
    make
    sudo make install

  • 당신이 당신의 /etc/apache2/httpd.conf 파일의 끝에 다음 줄이 있는지 확인

이렇게하면됩니다. 그렇지 않은 경우 mod_mono 컴파일 결과를 게시하여 오류가 발생했는지 확인하십시오. 그리고 httpd.conf 파일 : 문제는 mod_mono와 충돌하는 다른 아파치 모듈과 관련이있을 수 있습니다.

나는 그것이 AutoHosting 기능을 사용할 수 있기 때문에, mod_mono.conf 파일의 my own version을 사용하는 것이 좋습니다 (그냥 "EN-US.UTF-8"또는 "JA-JP.UTF-8"처럼, 현재의 문화와 MonoSetEnv LANG=fr_FR.UTF-8 라인을 교체).

행운을 빈다. : o)

+0

가까이에! 더 이상 mach-o 오류를 얻지 못했습니다. mod_mono config가로드 된 아파치를 시작하려고 할 때 SIGTERM이 발생합니다. –

+0

명령은 광산과 똑같은 출력을 가지므로 mod_mono의 컴파일이 정상적으로 진행됩니다. 아마도 "make install"출력에서 제안한 것을 할 수있을 것입니다 :'경고 : libtool --finish/usr/local/lib'를 실행하십시오. 그것은 내 시스템에서 필요하지 않았기 때문에 문제가 해결되지 않았다 (mod_mono의 매뉴얼 페이지 만/usr/local에 설치되었다). "httpd.conf"파일을 게시하여 내 것과 다른 점을 볼 수 있습니까? 귀하의 시스템에 대한 또 다른 질문 : 그것이 사자 설치 또는 Snow Leopard에서의 업그레이드입니까? – CedX

관련 문제