Mono compiler // Terminal emulator issue

浪尽此生 提交于 2019-12-11 09:14:09

问题


I get this error when I try to compile csharp or fsharp files. This happens when using gnome terminal or jetbrain rider.

It works fine in tty or termials like xterm and urxvt. Also I am able to compile c, c++ and go code.

Btw, I am using Arch/Antergos and got this issue yesterday.

Unhandled Exception: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542 at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in :0 at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in :0 at System.TermInfoDriver..ctor (System.String term) [0x00055] in :0 at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in :0 at System.ConsoleDriver..cctor () [0x0004d] in :0 --- End of inner exception stack trace --- at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in :0 at System.Console..cctor () [0x0008e] in :0 --- End of inner exception stack trace --- at Mono.CSharp.Driver.Main (System.String[] args) [0x00019] in <2b1e99ce45b54209bdcdab138d9758ae>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542 at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in :0 at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in :0 at System.TermInfoDriver..ctor (System.String term) [0x00055] in :0 at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in :0 at System.ConsoleDriver..cctor () [0x0004d] in :0 --- End of inner exception stack trace --- at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00007] in :0 at System.Console..cctor () [0x0008e] in :0 --- End of inner exception stack trace --- at Mono.CSharp.Driver.Main (System.String[] args) [0x00019] in <2b1e99ce45b54209bdcdab138d9758ae>:0

来源:https://stackoverflow.com/questions/48886689/mono-compiler-terminal-emulator-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!