当我尝试编译 csharp 或 fsharp 文件时出现此错误。使用 gnome 终端或 jetbrain rider 时会发生这种情况。
它在 tty 或 xterm 和 urxvt 等终端中运行良好。
我还能够编译 c、c++ 和 go 代码。
顺便说一句,我正在使用 Arch/Antergos,昨天遇到了这个问题。
未处理的异常:
System.TypeInitializationException:“System.Console”的类型初始值设定项引发异常。 ---> System.TypeInitializationException:“System.ConsoleDriver”的类型初始值设定项引发异常。 ---> System.Exception:幻数错误:542
在 System.TermInfoReader.ReadHeader (System.Byte[] 缓冲区,System.Int32& 位置) [0x00028] 处:0
在 System.TermInfoReader..ctor (System.String 术语,System.String 文件名)[0x0005f] 中:0
在 System.TermInfoDriver..ctor (System.String 术语)[0x00055] 中:0
在 System.ConsoleDriver.CreateTermInfoDriver (System.String 术语)[0x00000] 中:0
在 System.ConsoleDriver..cctor () [0x0004d] 中:0
--- 内部异常堆栈跟踪结束 ---
在 System.Console.SetupStreams (System.Text.Encoding inputEncoding、System.Text.Encoding outputEncoding) [0x00007] 中:0
在 System.Console..cctor () [0x0008e] 中:0
--- 内部异常堆栈跟踪结束 ---
在 中的 Mono.CSharp.Driver.Main (System.String[] args) [0x00019]:0
[错误]致命的未处理异常:System.TypeInitializationException:“System.Console”的类型初始值设定项引发异常。 ---> System.TypeInitializationException:“System.ConsoleDriver”的类型初始值设定项引发异常。 ---> System.Exception:幻数错误:542
在 System.TermInfoReader.ReadHeader (System.Byte[] 缓冲区,System.Int32& 位置) [0x00028] 处:0
在 System.TermInfoReader..ctor (System.String 术语,System.String 文件名)[0x0005f] 中:0
在 System.TermInfoDriver..ctor (System.String 术语)[0x00055] 中:0
在 System.ConsoleDriver.CreateTermInfoDriver (System.String 术语)[0x00000] 中:0
在 System.ConsoleDriver..cctor () [0x0004d] 中:0
--- 内部异常堆栈跟踪结束 ---
在 System.Console.SetupStreams (System.Text.Encoding inputEncoding、System.Text.Encoding outputEncoding) [0x00007] 中:0
在 System.Console..cctor () [0x0008e] 中:0
--- 内部异常堆栈跟踪结束 ---
在 中的 Mono.CSharp.Driver.Main (System.String[] args) [0x00019]:0
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)