我已使用sudo pacman -S fsharp mono
安装了fsharp软件包和mono,但在终端中运行fsharpi
时出现以下错误消息。
Exception by fsi.exe:
System.TypeInitializationException: The type initializer for 'Microsoft.FSharp.Compiler.AbstractIL.IL' threw an exception. ---> System.TypeInitializationException: The type initializer for '<StartupCode$FSharp-Compiler>.$Microsoft.FSharp.Compiler.AbstractIL.IL' threw an exception. ---> System.InvalidTimeZoneException: TZ file too big for the buffer
at System.TimeZoneInfo.BuildFromStream (System.String id, System.IO.Stream stream) [0x00022] in <73ee1b14c2fa4d61b481096ff3d8d6d7>:0
at System.TimeZoneInfo.FindSystemTimeZoneByFileName (System.String id, System.String filepath) [0x00015] in <73ee1b14c2fa4d61b481096ff3d8d6d7>:0
at System.TimeZoneInfo.CreateLocal () [0x000cc] in <73ee1b14c2fa4d61b481096ff3d8d6d7>:0
at System.TimeZoneInfo.get_Local () [0x00009] in <73ee1b14c2fa4d61b481096ff3d8d6d7>:0
at System.TimeZoneInfo.GetDateTimeNowUtcOffsetFromUtc (System.DateTime time, System.Boolean& isAmbiguousLocalDst) [0x00000] in <73ee1b14c2fa4d61b481096ff3d8d6d7>:0
at System.DateTime.get_Now () [0x00008] in <73ee1b14c2fa4d61b481096ff3d8d6d7>:0
at <StartupCode$FSharp-Compiler>.$Microsoft.FSharp.Compiler.AbstractIL.IL..cctor () [0x0028c] in <5920c30f7f81fe20a74503830fc32059>:0
--- End of inner exception stack trace ---
at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr)
at Microsoft.FSharp.Compiler.AbstractIL.IL..cctor () [0x00000] in <5920c30f7f81fe20a74503830fc32059>:0
--- End of inner exception stack trace ---
at Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSession..ctor (Microsoft.FSharp.Compiler.Interactive.Shell+FsiEvaluationSessionHostConfig fsi, System.String[] argv, System.IO.TextReader inReader, System.IO.TextWriter outWriter, System.IO.TextWriter errorWriter) [0x00010] in <5920c329046a099ca745038329c32059>:0
at Microsoft.FSharp.Compiler.Interactive.Shell.evaluateSession@2897 (System.String[] argv, Microsoft.FSharp.Core.Unit unitVar0) [0x0010d] in <5920c329046a099ca745038329c32059>:0
答案 0 :(得分:1)
请看一下https://bbs.archlinux.org/viewtopic.php?id=210401。 您可能需要为已配置的时区重新创建正确的链接。
# rm /etc/localtime
# ln -s /usr/share/zoneinfo/America/Sao_Paulo //change the zone for your region