.NET Command Line Tools (2.1.4)
Product Information:
_Version: 2.1.4
Commit SHA-1 hash: 5e8add2190_
Runtime Environment:
_OS Name: arch
OS Version:
OS Platform: Linux
RID: linux-x64
Base Path: /opt/dotnet/sdk/2.1.4/_
Microsoft .NET Core Shared Framework Host
_Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54_
Attempting to run dotnet on Arch Linux SERVER restore ends with an error. And it is very strange. I have a PC with Arch Linux and Gnome and it works there perfectly (checked just now). However, I rented and checked 2 different servers dedicated to OVH from Arch Linux without gui and there are always these errors. Clean systems, the only difference that I have on a PC with Gnome and there is only a server version. Regardless of what project it is. On the example of neo-cli:
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
System.InvalidOperationException: The terminfo database is invalid.
at System.TermInfo.Database..ctor(String term, Byte[] data)
at System.TermInfo.Database.ReadDatabase(String term, String directoryPath)
at System.TermInfo.Database.ReadDatabase(String term)
at System.TermInfo.Database.ReadActiveDatabase()
at System.ConsolePal.TerminalFormatStrings.<>c.<.cctor>b__27_0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.ConsolePal.EnsureInitializedCore()
at System.ConsolePal.ControlCHandlerRegistrar.Register()
at System.Console.add_CancelKeyPress(ConsoleCancelEventHandler value)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) in E:\A\_work\17\s\src\MSBuild\XMake.cs:line 526
Unhandled Exception: System.InvalidOperationException: The terminfo database is invalid.
at System.TermInfo.Database..ctor(String term, Byte[] data)
at System.TermInfo.Database.ReadDatabase(String term, String directoryPath)
at System.TermInfo.Database.ReadDatabase(String term)
at System.TermInfo.Database.ReadActiveDatabase()
at System.ConsolePal.TerminalFormatStrings.<>c.<.cctor>b__27_0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.ConsolePal.EnsureInitializedCore()
at System.ConsolePal.ControlCHandlerRegistrar.Register()
at System.Console.add_CancelKeyPress(ConsoleCancelEventHandler value)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine) in E:\A\_work\17\s\src\MSBuild\XMake.cs:line 748
at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args) in E:\A\_work\17\s\src\MSBuild\XMake.cs:line 215
Steps to reproduce:
git clone https://github.com/neo-project/neo-cli
cd neo-cli
dotnet restore
cc @rainersigwald
With that error, I'm inclined to blame CoreFX. It's thrown here or here.
Either the validation checks are bad or there's something wrong with terminfo on the server machine.
@Redni can you share the following:
TERM
environment variable in the failing caseTERMINFO
environment variable~/.terminfo
if it exists/etc/terminfo
if it exists/lib/terminfo
if it exists/usr/share/terminfo
if it existsstrace -e trace=file dotnet build
on the failing machinealso adding @steveharter so that he can help point to the right person in corefx.
TERM
is a xterm-256color
TERMINFO
is not set~/.terminfo
is not exist/etc/terminfo
is not exist/lib/terminfo
is in the attachment lib.terminfo.zip/usr/share/terminfo
is in the attachment share.terminfo.zipstrace -e trace=file dotnet build
is in the attachment dotnet.logArch Linux: https://bugs.archlinux.org/task/57260
I didn't find a corefx issue that matches the InvalidOperationException + terminfo.
However other platforms have issues with terminfo:
https://github.com/dotnet/corefx/issues/24259
cc @wfurt
Probably the problem is in ncurses 6.1, i downgraded to 6.0+20170902-3
@TFSThiagoBR98 you are right. On PC I had ncurses 6.0 and on server 6.1 I changed the version on the server to 6.0 and everything works fine. We already know what causes the problem. However, how to make the dotnet also work properly on the newer version of ncurses?
I think this issue should be moved to corefx, where it will have far better visibility.
Same errors. I have to downgraded to 6.0+20170902-3 too.
I believe this issue belongs to corefx and dotnet/corefx#26966 captures the issue. Closing in favor of that issue. Please reopen this issue if you believe this to be in error.
I also run Arch and can confirm that downgrading to 6.0+20170902-3 is a passable workaround until the framework has a fix.
Per @lewurm on the corefx issue: another workaround to this issue when using a 6.1 ncurses is to invoke dotnet
with TERM=xterm
:
$ TERM=xterm dotnet
Hi @peterhuene Thanks for the solution, why would TERM=xterm fix the problem though?
New terminfo database start using some new features and older dotnet is not able to parse it correctly.
'xterm' however did not change so everything works as it used to.
For now, I added:
.bashrc
alias dotnet='TERM=xterm dotnet'
To my ~/.bashrc
.
But it looks to be resolved shortly. :+1:
Most helpful comment
Per @lewurm on the corefx issue: another workaround to this issue when using a 6.1 ncurses is to invoke
dotnet
withTERM=xterm
: