Linuxで.netを実行する

Linuxで.netを実行する

私のコンピュータで.netを実行するのに問題があります。

uname -a
Linux Olympus 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux

私は以下を介して.netコアをインストールしました。https://www.microsoft.com/net/core#linuxdebian

私が従ったコマンドは次のとおりです。

sudo apt-get install curl libunwind8 gettext
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?linkid=843453
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
sudo ln -s /opt/dotnet/dotnet /usr/local/bin

次に、初期化コードの次のステップを使用すると、次のような結果が得られます。

dotnet --info
.NET Command Line Tools (1.0.1)

Product Information:
 Version:            1.0.1

Runtime Environment:
 OS Name:     kali
 OS Version:  2016.2
 OS Platform: Linux
 RID:         debian.8-x64
 Base Path:   /opt/dotnet/sdk/1.0.1

私が得るエラーは次のとおりです。

dotnet new

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Crypto' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CryptoInitializer' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native.OpenSsl': The specified module could not be found.
 (Exception from HRESULT: 0x8007007E)
   at Interop.CryptoInitializer.EnsureOpenSslInitialized()
   at Interop.CryptoInitializer..cctor()
   --- End of inner exception stack trace ---
   at Interop.Crypto..cctor()
   --- End of inner exception stack trace ---
   at Interop.Crypto.GetRandomBytes(Byte* buf, Int32 num)
   at System.IO.Path.GetCryptoRandomBytesOpenSsl(Byte* bytes, Int32 byteCount)
   at System.IO.Path.GetCryptoRandomBytes(Byte* bytes, Int32 byteCount)
   at System.IO.Path.GetRandomFileName()
   at Microsoft.DotNet.InternalAbstractions.TemporaryDirectory..ctor()
   at Microsoft.Extensions.EnvironmentAbstractions.DirectoryWrapper.CreateTemporaryDirectory()
   at Microsoft.DotNet.Configurer.NuGetPackagesArchiver..ctor()
   at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(INuGetCacheSentinel nugetCacheSentinel)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
Aborted

この問題について調べてみましたが、ほとんどの質問はMacOSxとMacに関する質問でした。

また、opensslを更新しようとしました。

openssl version
OpenSSL 1.1.0e  16 Feb 2017

次は何をすべきか分からない。他の人にこの問題が発生したか、ここでどこに行くかを知っている人はいますか? Linux mint 17ではdotnetを正常に使用できましたが、kali linuxでは使用できませんでした。

ベストアンサー1

私はついにこれを見つけることができました。 (申し訳ありませんが、私はこのサイトに初めて来たので、この質問は私からのものですが、当時私はアカウントを作成していませんでした。)

最新のKali(kali 2016.2)をインストールしてから、私が提供したWebサイト(実際には最新ではない)から最新のdotnetコアバージョン1.0.1をインストールしようとするたびに、dotnetの前にダウングレードする必要がある多くの依存関係があります。以前のバージョンで実行できます。

1つ目は、libicu57をlibicu52にダウングレードすることです(debianパッケージサイトにあります)。これにより、次の問題が解決されます。

Failed to initialize CoreCLR, HRESULT: 0x80131500

次に、以前のバージョンのlibsslをインストールする必要があります(libssl1.0.2からlibssl1.0.0にダウングレード)。これにより、この記事の元の問題が解決されます。

次に、dotnet new、dotnet Restore、およびdotnet runを呼び出すときに分割エラーを防ぐには、libcurl3をダウングレードする必要があります(libcurl3 7.52からlibcurl3 7.38へ)。

そうする必要があります。

おすすめ記事