stratisproject / StratisBitcoinFullNode

Bitcoin full node in C#
https://stratisplatform.com
MIT License
787 stars 315 forks source link

Compiling on Linux error #4106

Closed einewton closed 4 years ago

einewton commented 4 years ago

Trying to update my node, and getting error.

OS: Ubuntu 18.04.3 LTS

After installing the DotNet 2.1 SDK I do the following:

  1. git clone https://github.com/stratisproject/StratisBitcoinFullNode.git
  2. cd StratisBitcoinFullNode/src/Stratis.StratisD/
  3. dotnet run (Same result with dotnet build then running the dll)

Error:

There was a problem initializing the node. Details: 'System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.Extensions, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Runtime.Extensions, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at Stratis.Bitcoin.Configuration.Logging.LoggingConfiguration.AddConsoleWithFilters(ILoggerFactory loggerFactory)
   at Stratis.Bitcoin.Configuration.NodeSettings..ctor(Network network, ProtocolVersion protocolVersion, String agent, String[] args, NetworksSelector networksSelector) in /home/ubuntu/StratisBitcoinFullNode/src/Stratis.Bitcoin/Configuration/NodeSettings.cs:line 140
   at Stratis.StratisD.Program.Main(String[] args) in /home/ubuntu/StratisBitcoinFullNode/src/Stratis.StratisD/Program.cs:line 30
DemonRx commented 4 years ago

@einewton my setup is using dotnet 2.2.8

ii  dotnet-host                                                 3.1.0-1                                         amd64        Microsoft .NET Core Host - 3.1.0 Preview 3
ii  dotnet-hostfxr-2.2                                          2.2.8-1                                         amd64        Microsoft .NET Core Host FX Resolver - 2.2.8 2.2.8
ii  dotnet-runtime-2.2                                          2.2.8-1                                         amd64        Microsoft .NET Core Runtime - 2.2.8 Microsoft.NETCore.App 2.2.8
ii  dotnet-runtime-deps-2.2                                     2.2.8-1                                         amd64        dotnet-runtime-deps-2.2 2.2.8
ii  dotnet-sdk-2.2                                              2.2.402-1                                       amd64        Microsoft .NET Core SDK 2.2.402
einewton commented 4 years ago

I also have 2.2.8 with same result. Here is my dotnet info

.NET Core SDK (reflecting any global.json): Version: 3.1.100 Commit: cd82f021f4

Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /usr/share/dotnet/sdk/3.1.100/

Host (useful for support): Version: 3.1.0 Commit: 157910edee

.NET Core SDKs installed: 2.1.802 [/usr/share/dotnet/sdk] 2.2.402 [/usr/share/dotnet/sdk] 3.1.100 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.14 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.14 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.14 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

DemonRx commented 4 years ago

You should just have one version installed

On Mon, Dec 23, 2019 at 10:56 AM Einewton notifications@github.com wrote:

I also have 2.2.8 with same result. Here is my dotnet info

.NET Core SDK (reflecting any global.json): Version: 3.1.100 Commit: cd82f021f4

Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /usr/share/dotnet/sdk/3.1.100/

Host (useful for support): Version: 3.1.0 Commit: 157910edee

.NET Core SDKs installed: 2.1.802 [/usr/share/dotnet/sdk] 2.2.402 [/usr/share/dotnet/sdk] 3.1.100 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.14 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.14 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.14 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stratisproject/StratisBitcoinFullNode/issues/4106?email_source=notifications&email_token=AEMUFLUSD3JO4CWIRP4TYUTQ2DNRNA5CNFSM4J6VPJYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHRMTRQ#issuecomment-568510918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMUFLQ2U3HGMXLQYFQ2ZZTQ2DNRNANCNFSM4J6VPJYA .

einewton commented 4 years ago

Anyone else getting this error, I resolved by doing the following:

  1. sudo apt-get remove dotnet-host
  2. sudo apt-get install dotnet-sdk-2.2

And now everything is working.

Thank you @FyreDemonyte