FSI.exe 在 Ubuntu 10.10 下不起作用 [英] FSI.exe does not work under Ubuntu 10.10

查看:14
本文介绍了FSI.exe 在 Ubuntu 10.10 下不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:尝试了 11 月的 CTP 版本.相同的错误信息.忘了说这台服务器安装了 Ubuntu 服务器版.我在运行 Desktop 10.10 的 Ubuntu 桌面上没有这个问题.所以我怀疑可能是缺少一些与命令行相关的库.安装 libreadline-dev 和 libreadline5 后,错误消息消失了.但是fsi卡住的问题还是存在的.

更新 2:尝试了新的 Mono 2.8.1.同样的 FSI 卡住问题.

更新3:由于这个问题非常容易重现,因此我将其作为 fsi.exe 中的错误报告给了 Microsoft.让我们看看情况如何.

更新4:得到了 Don Syme 的快速回复.他建议的解决方案解决了这个问题.我自己创造了答案.

你好,

我在运行 Ubuntu 10.10 和 Mono 2.8 的服务器上安装了 F# 2.0.fsc.exe 运行完美,我在编译 fs 文件时没有问题.但是,当我按如下方式运行 fsi.exe 时:单声道/usr/local/FSharp/bin/fsi.exe

I installed F# 2.0 in a server running Ubuntu 10.10 and Mono 2.8. fsc.exe runs perfect, I have no problem in compiling fs files. However, when I run fsi.exe as follows: mono /usr/local/FSharp/bin/fsi.exe

我收到了 FSI 提示,但错误消息不断重复

I got the FSI prompt, but an error message keep repeating

未能安装 ctrl-c 处理程序 - Ctrl-C 处理将不可用.错误是:调用目标抛出异常"

"Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was: Exception has been thrown by the target of an invocation"

我这里有什么遗漏吗?

Mono 2.8 是从源代码编译和安装的.

The Mono 2.8 was compiled and installed from source.

推荐答案

回答我自己的问题真的很尴尬.无论如何,我会回答它,以便其他人可以从中受益.

Feel really awkward to answer my own question. Anyway, I'll answer it so other people can benefit from.

首先,安装 libreadline-dev 和 libreadline5 这样就可以摆脱下面的错误提示

First of all, install libreadline-dev and libreadline5 so you can get rid of the following error message

安装 ctrl-c 处理程序失败 - Ctrl-C 处理将不可用.错误是:调用目标抛出异常

如果您遇到 fsi.exe 卡住的问题,请尝试

If you encounter fsi.exe stuck issue, try

 fsi --gui-

它在我的情况下完美运行.

It works perfectly in my case.

这是我对为什么会发生这种问题的理解.如果查看代码,您会发现 fsi.exe 实际上引用了 System.Windows.Forms,它进一步链接到 Window 系统.就我而言,我在没有安装 X 系统的服务器上运行 fsi.因此,fsi 卡在那里试图与不存在的 X 对话.这就解释了为什么我的桌面没有这个问题.

Here is my understanding of why such an issue happened. If you look into the code, you will find out fsi.exe actually references System.Windows.Forms, which further links to the Window system. In my case, I ran fsi in a server without X system installed. Consequently, fsi stuck there trying to talk to the nonexistent X. That explains why I don't have the issue in my desktop.

这篇关于FSI.exe 在 Ubuntu 10.10 下不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆