在 macOS Sierra 上安装 Mono 时遇到问题
Having trouble with installing Mono on macOS Sierra
我从 www.mono-project.com/download/ 下载了软件包并安装它没有任何问题。为了检查我是否安装正确,我做了 中的用户说我应该做的事情。
我在终端中运行以下命令:
$ which mono
/Library/Frameworks/Mono.framework/Versions/Current/bin//mono
$ which mcs
/Library/Frameworks/Mono.framework/Versions/Current/bin//mcs
$ mono --version
Mono JIT compiler version 5.2.0.215 (d15-3/da80840 Thu Jul 20 16:43:07 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-master/8b1520c)
GC: sgen (concurrent by default)
然而,当我尝试 运行 Visual Studio 代码上的某些代码时,出现以下错误:
Failed to start language services. Please check if mono is in PATH
所以我检查了我的路径:
$ echo $PATH
/Library/Frameworks/Mono.framework/Versions/Current/bin/:/Users/Steve/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/Steve/Desktop/nand2tetris/tools:/Library/Frameworks/Mono.framework/Versions/Current/bin/:/usr/local/mono/bin:/usr/local/bin
我 运行在终端中使用 F# 没有问题,所以我知道它已正确安装。
有什么解决方法的建议吗?
您应该尝试在用户设置中同时设置 "FSharp.monoPath"
和 "FSharp.fsiFilePath"
。尝试将以下行添加到 settings.json
:
"FSharp.fsiFilePath": "/Library/Frameworks/Mono.framework/Versions/Current/Commands/fsharpi",
"FSharp.toolsDirPath": "/Library/Frameworks/Mono.framework/Versions/Current/Commands",
请注意,/Library/Frameworks/Mono.framework/Versions/Current/Commands
是最新版本中 Mono 命令的正确路径。
我从 www.mono-project.com/download/ 下载了软件包并安装它没有任何问题。为了检查我是否安装正确,我做了
我在终端中运行以下命令:
$ which mono
/Library/Frameworks/Mono.framework/Versions/Current/bin//mono
$ which mcs
/Library/Frameworks/Mono.framework/Versions/Current/bin//mcs
$ mono --version
Mono JIT compiler version 5.2.0.215 (d15-3/da80840 Thu Jul 20 16:43:07 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-master/8b1520c)
GC: sgen (concurrent by default)
然而,当我尝试 运行 Visual Studio 代码上的某些代码时,出现以下错误:
Failed to start language services. Please check if mono is in PATH
所以我检查了我的路径:
$ echo $PATH
/Library/Frameworks/Mono.framework/Versions/Current/bin/:/Users/Steve/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/Steve/Desktop/nand2tetris/tools:/Library/Frameworks/Mono.framework/Versions/Current/bin/:/usr/local/mono/bin:/usr/local/bin
我 运行在终端中使用 F# 没有问题,所以我知道它已正确安装。
有什么解决方法的建议吗?
您应该尝试在用户设置中同时设置 "FSharp.monoPath"
和 "FSharp.fsiFilePath"
。尝试将以下行添加到 settings.json
:
"FSharp.fsiFilePath": "/Library/Frameworks/Mono.framework/Versions/Current/Commands/fsharpi",
"FSharp.toolsDirPath": "/Library/Frameworks/Mono.framework/Versions/Current/Commands",
请注意,/Library/Frameworks/Mono.framework/Versions/Current/Commands
是最新版本中 Mono 命令的正确路径。