简体   繁体   English

在Ubuntu 14.04上“无法解析coreclr”路径

[英]“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 newdotnet restoredotnet 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. dotnetdotnet-nightlydotnet-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 newdotnet restoredotnet compiledotnet_run按预期工作。 I didn't tried more complicated programs. 我没有尝试过更复杂的程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM