[英]How to run .NET 4.5 on XSP using Mono?
I have installed Mono 3 however when I run xsp
or xsp4
it shows that I'm using .NET 4.0. 我安装了Mono 3,但是当我运行
xsp
或xsp4
它表明我使用的是.NET 4.0。 I need to have .NET 4.5. 我需要.NET 4.5。 Is it possible?
可能吗? Where can I configure it?
我在哪里可以配置它?
I've seen this page but I don't have any of those folders where I downloaded sources. 我已经看过这个页面,但我没有任何下载源代码的文件夹。
This is what it shows when I enter website by running xsp4
: 这是我通过运行
xsp4
进入网站时显示的xsp4
:
Version Information: 3.2.7 (master/1eef047 C nov 28 18:16:30 EET 2013);
版本信息:3.2.7(master / 1eef047 C nov 28 18:16:30 EET 2013); ASP.NET Version: 4.0.30319.17020
ASP.NET版本:4.0.30319.17020
Firstly I downloaded Lubuntu 13.10 32bit and launched it inside VirtualBox. 首先我下载了Lubuntu 13.10 32bit并在VirtualBox中启动了它。 Then did
apt-get update
and apt-get upgrade
. 然后做了
apt-get update
和apt-get upgrade
。 After that rebooted the system. 之后重启系统。
Make sure all commands are executed as super user. 确保所有命令都以超级用户身份执行。
sudo -s
Got dependencies 有依赖
apt-get install autoconf automake libtool g++ gettext libglib2.0-dev libpng12-dev libfontconfig1-dev mono-gmcs git
Downloaded sources of Mono and XSP 下载了Mono和XSP的源代码
cd /opt
git clone git://github.com/mono/mono.git
git clone git://github.com/mono/xsp.git
Installed latest stable Mono from github 从github安装最新稳定的Mono
cd /opt/mono
./autogen.sh --prefix=/usr
make
make install
Installed latest stable XSP from github 从github安装最新稳定的XSP
cd /opt/xsp
./autogen.sh --prefix=/usr
make
make install
Tested that I have 4.0 running on XSP instead of 4.5 测试我在XSP上运行4.0而不是4.5
cd /home/pc/web
xsp4 # 4.0
xsp2 # 2.0
xsp # 2.0
/usr/bin/xsp4
looks like it should use 4.5. /usr/bin/xsp4
看起来应该使用4.5。 Just like this answer suggested. 就像这个答案所说的那样。 Also, I don't have
xsp4.exe
in my /usr/lib/mono/4.0/
only in /usr/lib/mono/4.5/
so I cannot copy anything like suggested in that answer. 另外,我的
/usr/lib/mono/4.0/
只有/usr/lib/mono/4.5/
没有xsp4.exe
,因此我无法复制该答案中建议的内容。
#!/bin/sh
exec /usr/bin/mono $MONO_OPTIONS "/usr/lib/mono/4.5/xsp4.exe" "$@"
You say "I don't have any of those folders where I downloaded sources" referring to /opt/mono/bin/xsp4
. 您说“我没有任何下载源的文件夹”,指的是
/opt/mono/bin/xsp4
。 But you're confusing things, and I know it because you shared how you installed mono. 但是你很困惑,我知道它,因为你分享了你安装单声道的方式。
/opt/mono
should not be the place where you clone the mono repository to compile it. /opt/mono
不应该是克隆单声道存储库以进行编译的地方。 You should clone it somewhere else like your home folder. 您应该将其克隆到其他位置,例如您的主文件夹。 Ie: /home/username/code/mono.
即:/ home / username / code / mono。
/opt/mono
is where usually people install a custom version of mono. /opt/mono
通常是人们安装自定义版本的mono。 The way they do it is passing this path to the --prefix argument. 他们这样做的方法是将此路径传递给--prefix参数。 But you're passing /usr as the prefix argument!
但是你传递/ usr作为前缀参数! So then you're installing it to a different location compared to the SO answer that you point out.
因此,与您指出的SO答案相比,您将其安装到不同的位置。
Also, it is not recommended that you do ALL those operations as a superuser. 此外,不建议您以超级用户身份执行所有这些操作。 You normally compile code without root privileges, and you only need sudo for the install phase.
您通常在没有root权限的情况下编译代码,并且在安装阶段只需要sudo。 So don't do "sudo -s" before everything.
所以不要在所有事情之前做“sudo -s”。 Just compile, and when you're done, do
sudo make install
. 只需编译,当你完成后,做
sudo make install
。 This will also make you have binaries that are not owned by root. 这也将使您拥有不归root所有的二进制文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.