[英]“Could not resolve coreclr” path on Ubuntu 14.04
TL;DR TL; DR
I'm following the documentation at http://dotnet.github.io/getting-started/ for Ubuntu 14.04. 我正在关注Ubuntu 14.04的http://dotnet.github.io/getting-started/上的文档。
When I run dotnet run
it outputs Could not resolve coreclr path
and it immediatly exit with non zero return code, and I can't find in the documentation what I'm supposed to do. 当我运行dotnet run
它输出Could not resolve coreclr path
,它立即退出非零返回代码,我在文档中找不到我应该做什么。
More details 更多细节
Actually, something unexpected occured before that: even though I added deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main
to my sources, there's not dotnet
package. 实际上,之前发生了一些意想不到的事情:即使我将deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main
到我的来源,也没有dotnet
包。 However there's a dotnet-dev
package, so it's this package I actually installed. 但是有一个dotnet-dev
软件包,所以这是我实际安装的软件包。
When I run dotnet new
, dotnet restore
, or dotnet compile
, everything seems ok. 当我运行dotnet new
, dotnet restore
或dotnet compile
,一切似乎都可以。
When I run locate coreclr
I find several files which my match. 当我运行locate coreclr
我找到了几个匹配的文件。 In particular there's a /usr/share/dotnet-dev/runtime/coreclr
directory with several .dll
s and .so
s in it. 特别是有一个/usr/share/dotnet-dev/runtime/coreclr
目录,里面有几个.dll
和.so
s。 There's also a $HOME/.dnx/packages/runtime.ubuntu.14.04-x64.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23616/runtimes/ubuntu.14.04-x64/native/libcoreclr.so
file 还有$HOME/.dnx/packages/runtime.ubuntu.14.04-x64.Microsoft.NETCore.Runtime.CoreCLR/1.0.1-rc2-23616/runtimes/ubuntu.14.04-x64/native/libcoreclr.so
文件
Use dotnet-nightly
. 使用dotnet-nightly
。 I just tried, it is still working. 我刚试过,它还在工作。 dotnet
is not installing and dotnet-dev
is broken. dotnet
没有安装, dotnet-dev
坏了。
Source: http://apt-mo.trafficmanager.net/repos/dotnet/dists/trusty/main/binary-amd64/Packages 来源: http : //apt-mo.trafficmanager.net/repos/dotnet/dists/trusty/main/binary-amd64/Packages
I've faced the same problem. 我遇到了同样的问题。 Neither dotnet
, dotnet-nightly
nor dotnet-dev
worked out of the box. dotnet
, dotnet-nightly
和dotnet-dev
dotnet-nightly
没有开箱即用。
But running directly /usr/share/dotnet/bin/corerun
on the corresponding dll
worked. 但直接在相应的dll
上运行/usr/share/dotnet/bin/corerun
工作。 It's less convenient than dotnet run
but does the job. 它不像dotnet run
那么方便,但可以胜任。
To simplify my life, I added an alias to my .bash_rc
: 为了简化我的生活,我在.bash_rc
添加了一个别名:
dotnet_run() {
if [ $# -lt 1 ]
then
app=${PWD##*/}
else
app=$1
fi
if [ ! -f $app ]
then
app=bin/Debug/dnxcore50/$app.dll
fi
echo "Running: $app"
/usr/share/dotnet-dev/bin/corerun $app
}
On my computer, dotnet new
, dotnet restore
, dotnet compile
, dotnet_run
worked as expected. 在我的计算机上, dotnet new
, dotnet restore
, dotnet compile
, dotnet_run
按预期工作。 I didn't tried more complicated programs. 我没有尝试过更复杂的程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.