有没有人在 Ubuntu 12.04 上使用 C#/mono 的 g-wan?(你是怎么做到的?)
我按照http://gwan.com/faq#languages上的说明进行操作。
我使用的大多数其他语言包括 Java 和 Oracle 7 JRE/JDK。
我正在运行 G-WAN 3.3.28 64 位(2012 年 3 月 28 日 11:24:16)
我有一个hello.cs脚本(在 csp/ 下的其他 hello 示例旁边),其中包含来自 gwan 网站的示例代码:
using System;
public class hello
{
public static int Main(string[] args)
{
Gwan.xbufCat(Gwan.getReply(args[0]), "Hello World");
return 200; // HTTP status (200:'OK')
}
}
当我启动 gwan 时,它没有显示任何迹象表明它正在加载对 C# 的支持。我看到了一个用于java、sqlite3和tkcabinet
的 API /library,我在这里缺少 C# 的东西吗?
我使用apt-get install mono-devel来设置单声道。二进制文件位于 /usr/bin 中。
我不清楚 g-wan 支持/使用哪个 C# 编译器 - AFAIK 每个 C# 版本都有不同的单声道编译器。
这是日志文件,我没有看到对 hello.cs 的任何引用。
我检查了hello.cs的文件权限,它们与其他脚本相同。
[Sat Sep 29 17:33:27 2012 GMT] ------------------------------------------
[Sat Sep 29 17:33:27 2012 GMT] G-WAN 3.3.28 64-bit (Mar 28 2012 11:24:16)
[Sat Sep 29 17:33:27 2012 GMT] ------------------------------------------
[Sat Sep 29 17:33:27 2012 GMT] Local Time: Sat, 29 Sep 2012 10:33:27 GMT-7
[Sat Sep 29 17:33:27 2012 GMT] RAM : (989.60 MB free + 0 shared + 207.18 MB buffers) / 3.92 GB total
[Sat Sep 29 17:33:27 2012 GMT] DISK: 105.10 GB free / 114.19 GB total
[Sat Sep 29 17:33:27 2012 GMT] 390 processes running
[Sat Sep 29 17:33:27 2012 GMT] 1 Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz (2 Cores/CPU, 1 threads/Core)
[Sat Sep 29 17:33:27 2012 GMT] Using 2 worker threads
[Sat Sep 29 17:33:27 2012 GMT] 64-bit little-endian (least significant byte first)
[Sat Sep 29 17:33:27 2012 GMT] Ubuntu 12.04.1 LTS \n \l (3.2.0-31-generic) 64-bit
[Sat Sep 29 17:33:27 2012 GMT] Glibc: 2.15 (stable)
[Sat Sep 29 17:33:27 2012 GMT] user: root (uid:0), group: root (uid:0)
[Sat Sep 29 17:33:27 2012 GMT] system fd_max: 1,024
[Sat Sep 29 17:33:27 2012 GMT] program fd_max: 1,024
[Sat Sep 29 17:33:27 2012 GMT] updated fd_max: 1,000,000
[Sat Sep 29 17:33:27 2012 GMT] Available network interfaces (2):
[Sat Sep 29 17:33:27 2012 GMT] 127.0.0.1
[Sat Sep 29 17:33:27 2012 GMT] 192.168.0.16
[Sat Sep 29 17:33:27 2012 GMT] memory footprint: 1.39 MB
[Sat Sep 29 17:33:27 2012 GMT] Host /home/shannon/gwan/gwan_linux64-bit/0.0.0.0_8080/#0.0.0.0:
[Sat Sep 29 17:33:27 2012 GMT] loaded loan.c
[Sat Sep 29 17:33:27 2012 GMT] loaded httpdate.c
[Sat Sep 29 17:33:27 2012 GMT] loaded chart.c
[Sat Sep 29 17:33:27 2012 GMT] loaded asm.c
[Sat Sep 29 17:33:27 2012 GMT] loaded served_from.c
[Sat Sep 29 17:33:27 2012 GMT] loaded report.c
[Sat Sep 29 17:33:27 2012 GMT] loaded captcha.c
[Sat Sep 29 17:33:27 2012 GMT] loaded setheaders.c
[Sat Sep 29 17:33:27 2012 GMT] loaded www_csp.c
[Sat Sep 29 17:33:27 2012 GMT] loaded folder/hellox.c
[Sat Sep 29 17:33:27 2012 GMT] loaded folder/argv.c
[Sat Sep 29 17:33:27 2012 GMT] loaded folder/hello.c
[Sat Sep 29 17:33:27 2012 GMT] loaded getheaders.c
[Sat Sep 29 17:33:27 2012 GMT] loaded contact.c
[Sat Sep 29 17:33:27 2012 GMT] loaded charts.c
[Sat Sep 29 17:33:27 2012 GMT] loaded forum.c
[Sat Sep 29 17:33:27 2012 GMT] loaded div_by_zero.c
[Sat Sep 29 17:33:27 2012 GMT] loaded json_bench.c
[Sat Sep 29 17:33:27 2012 GMT] JAVA_HOME: /usr/lib/jvm/java-7-oracle/
[Sat Sep 29 17:33:27 2012 GMT] loaded report.java
[Sat Sep 29 17:33:27 2012 GMT] loaded kv.c
[Sat Sep 29 17:33:27 2012 GMT] loaded 100.c
[Sat Sep 29 17:33:27 2012 GMT] loaded crash_libc.c
[Sat Sep 29 17:33:27 2012 GMT] loaded crash_gwcall.c
[Sat Sep 29 17:33:27 2012 GMT] loaded email.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hellox.c
[Sat Sep 29 17:33:27 2012 GMT] loaded data_uri.c
[Sat Sep 29 17:33:27 2012 GMT] loaded all.java
[Sat Sep 29 17:33:27 2012 GMT] loaded argv.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.mm
[Sat Sep 29 17:33:27 2012 GMT] loaded cookies.c
[Sat Sep 29 17:33:27 2012 GMT] loaded kv_bench.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.cpp
[Sat Sep 29 17:33:27 2012 GMT] loaded json.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.m
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.c
[Sat Sep 29 17:33:27 2012 GMT] loaded persistence.c
[Sat Sep 29 17:33:27 2012 GMT] loaded sqlite.c
[Sat Sep 29 17:33:27 2012 GMT] loaded servlet_name.c
[Sat Sep 29 17:33:27 2012 GMT] loaded base64.c
[Sat Sep 29 17:33:27 2012 GMT] loaded power.c
[Sat Sep 29 17:33:27 2012 GMT] loaded argv.java
[Sat Sep 29 17:33:27 2012 GMT] loaded comet.c
[Sat Sep 29 17:33:27 2012 GMT] loaded hello.java
[Sat Sep 29 17:33:27 2012 GMT] loaded crash.c
[Sat Sep 29 17:33:27 2012 GMT] loaded cache.c
[Sat Sep 29 17:33:27 2012 GMT] loaded request.c
[Sat Sep 29 17:33:27 2012 GMT] loaded redirect.c
[Sat Sep 29 17:33:27 2012 GMT] loaded fractal.c
[Sat Sep 29 17:33:27 2012 GMT] loaded loan.java
[Sat Sep 29 17:33:27 2012 GMT] loaded trace.c
[Sat Sep 29 17:33:27 2012 GMT] loaded noheaders.c
[Sat Sep 29 17:33:30 2012 GMT] memory footprint: 17.18 MB (with Java VM loaded)
[Sat Sep 29 17:33:30 2012 GMT] java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode
[Sat Sep 29 17:33:30 2012 GMT] server started