Monodevelop-仅使用sudo运行 [英] Monodevelop - runs only using sudo

查看:94
本文介绍了Monodevelop-仅使用sudo运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的Debian amd64 jessie构建上安装了Mono和Monodevelop,并且我只能使用提升的特权来运行monodevelop.

I've installed Mono and Monodevelop on my Debian amd64 jessie build, and I can only run monodevelop using elevated privilege.

从UI startesque菜单启动monodevelop不会导致任何事情发生.从shell启动monodevelop会导致以下错误:

Starting monodevelop from the UI startesque menu results in nothing appearing to happen. Starting monodevelop from a shell results in the following error:

未处理的异常: System.TypeInitializationException:MonoDevelop.Core.LoggingService的类型初始化器引发了一个异常---> System.Configuration.ConfigurationErrorsException:初始化配置系统时出错. ---> System.Configuration.ConfigurationErrorsException:无法识别的配置部分(/usr/lib/monodevelop/bin/MonoDevelop.exe.config第3行) 在System.Configuration.ConfigInfo.ThrowException(System.String文本,System.Xml.XmlReader阅读器)中:[0x00000]在:0中 在System.Configuration.SectionGroupInfo.ReadContent(System.Xml.XmlReader阅读器,System.Configuration.Configuration配置,布尔值OverrideAllowed,布尔值根)中:[0x00000],位于:0中 在System.Configuration.SectionGroupInfo.ReadRootData(System.Xml.XmlReader阅读器,System.Configuration.Configuration配置,布尔值OverrideAllowed)中:[0x00000],位于:0 在System.Configuration.Configuration.ReadConfigFile(System.Xml.XmlReader阅读器,System.String文件名)中的[0x00000]在:0中 在System.Configuration.Configuration.Load()[0x00000]中:: 0 在System.Configuration.Configuration.Init(IConfigSystem系统,System.String configPath,System.Configuration.Configuration父级)中:[0x00000],位于:0 在System.Configuration.Configuration..ctor(System.Configuration.InternalConfigurationSystem系统,System.String locationSubPath)中:[0x00000]在:0中 在System.Configuration.InternalConfigurationFactory.Create(System.Type typeConfigHost,System.Object [] hostInitConfigurationParams)中的[0x00000]在:0中 在System.Configuration.ConfigurationManager.OpenExeConfigurationInternal(ConfigurationUserLevel用户级别,System.Reflection.Assembly调用_assembly,System.String exePath)处[0x00000]在:0中 在System.Configuration.ClientConfigurationSystem.get_Configuration()[0x00000]中的位置:: 0 ---内部异常堆栈跟踪的结尾--- 在System.Configuration.ClientConfigurationSystem.get_Configuration()[0x00000]中的位置:: 0 在System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String configKey)[0x00000]中的:0 在System.Configuration.ConfigurationManager.GetSection(System.String sectionName)[0x00000]在:0中 在System.Configuration.ConfigurationSettings.GetConfig(System.String sectionName)[0x00000]在:0中 在System.Diagnostics.DiagnosticsConfiguration.get_Settings()[0x00000]中的位置:: 0 在System.Diagnostics.TraceImpl.InitOnce()[0x00000]中的位置:: 0 在System.Diagnostics.TraceImpl.get_Listeners()[0x00000]中的位置:: 0 在System.Diagnostics.Debug.get_Listeners()[0x00000]中的位置:: 0 在0中的MonoDevelop.Core.LoggingService..cctor()[0x00000]处 ---内部异常堆栈跟踪的结尾--- 在MonoDevelop.Ide.IdeStartup.Main(System.String [] args,MonoDevelop.Ide.Extensions.IdeCustomizer定制程序)中:[0x00000],在:0中 在MonoDevelop.Startup.MonoDevelopMain.Main(System.String [] args)[0x00000]在:0中 [错误]致命异常:System.TypeInitializationException:MonoDevelop.Core.LoggingService的类型初始化器引发了一个异常---> System.Configuration.ConfigurationErrorsException:初始化配置系统时出错. ---> System.Configuration.ConfigurationErrorsException:无法识别的配置部分(/usr/lib/monodevelop/bin/MonoDevelop.exe.config第3行) 在System.Configuration.ConfigInfo.ThrowException(System.String文本,System.Xml.XmlReader阅读器)中:[0x00000]在:0中 在System.Configuration.SectionGroupInfo.ReadContent(System.Xml.XmlReader阅读器,System.Configuration.Configuration配置,布尔值OverrideAllowed,布尔值根)中:[0x00000],在:0中 在System.Configuration.SectionGroupInfo.ReadRootData(System.Xml.XmlReader阅读器,System.Configuration.Configuration配置,布尔值OverrideAllowed)中:[0x00000],位于:0 在System.Configuration.Configuration.ReadConfigFile(System.Xml.XmlReader阅读器,System.String文件名)中的[0x00000]:0 在System.Configuration.Configuration.Load()[0x00000]中:: 0 在System.Configuration.Configuration.Init(IConfigSystem系统,System.String configPath,System.Configuration.Configuration父级)中:[0x00000],位于:0 在System.Configuration.Configuration..ctor(System.Configuration.InternalConfigurationSystem系统,System.String locationSubPath)中:[0x00000]在:0中 在System.Configuration.InternalConfigurationFactory.Create(System.Type typeConfigHost,System.Object [] hostInitConfigurationParams)中的[0x00000]在:0中 在System.Configuration.ConfigurationManager.OpenExeConfigurationInternal(ConfigurationUserLevel用户级别,System.Reflection.Assembly调用_assembly,System.String exePath)处:[0x00000],在:0中 在System.Configuration.ClientConfigurationSystem.get_Configuration()[0x00000]中的位置:: 0 ---内部异常堆栈跟踪的结尾--- 在System.Configuration.ClientConfigurationSystem.get_Configuration()[0x00000]中的位置:: 0 在System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String configKey)[0x00000]中的位置:: 0 在System.Configuration.ConfigurationManager.GetSection(System.String sectionName)[0x00000]在:0中 在System.Configuration.ConfigurationSettings.GetConfig(System.String sectionName)[0x00000]在:0中 在System.Diagnostics.DiagnosticsConfiguration.get_Settings()[0x00000]中的位置:: 0 在System.Diagnostics.TraceImpl.InitOnce()[0x00000]中的位置:: 0 在System.Diagnostics.TraceImpl.get_Listeners()[0x00000]中的位置:: 0 在System.Diagnostics.Debug.get_Listeners()[0x00000]中的位置:: 0 在0中的MonoDevelop.Core.LoggingService..cctor()[0x00000]处 ---内部异常堆栈跟踪的结尾--- 在MonoDevelop.Ide.IdeStartup.Main(System.String [] args,MonoDevelop.Ide.Extensions.IdeCustomizer定制程序)中:[0x00000]在

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for MonoDevelop.Core.LoggingService ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section (/usr/lib/monodevelop/bin/MonoDevelop.exe.config line 3) at System.Configuration.ConfigInfo.ThrowException (System.String text, System.Xml.XmlReader reader) [0x00000] in :0 at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) [0x00000] in :0 at System.Configuration.SectionGroupInfo.ReadRootData (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed) [0x00000] in :0 at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) [0x00000] in :0 at System.Configuration.Configuration.Load () [0x00000] in :0 at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) [0x00000] in :0 at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in :0 at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in :0 at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in :0 at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in :0 --- End of inner exception stack trace --- at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in :0 at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in :0 at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in :0 at System.Configuration.ConfigurationSettings.GetConfig (System.String sectionName) [0x00000] in :0 at System.Diagnostics.DiagnosticsConfiguration.get_Settings () [0x00000] in :0 at System.Diagnostics.TraceImpl.InitOnce () [0x00000] in :0 at System.Diagnostics.TraceImpl.get_Listeners () [0x00000] in :0 at System.Diagnostics.Debug.get_Listeners () [0x00000] in :0 at MonoDevelop.Core.LoggingService..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at MonoDevelop.Ide.IdeStartup.Main (System.String[] args, MonoDevelop.Ide.Extensions.IdeCustomizer customizer) [0x00000] in :0 at MonoDevelop.Startup.MonoDevelopMain.Main (System.String[] args) [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for MonoDevelop.Core.LoggingService ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section (/usr/lib/monodevelop/bin/MonoDevelop.exe.config line 3) at System.Configuration.ConfigInfo.ThrowException (System.String text, System.Xml.XmlReader reader) [0x00000] in :0 at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) [0x00000] in :0 at System.Configuration.SectionGroupInfo.ReadRootData (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed) [0x00000] in :0 at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) [0x00000] in :0 at System.Configuration.Configuration.Load () [0x00000] in :0 at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) [0x00000] in :0 at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in :0 at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in :0 at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00000] in :0 at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in :0 --- End of inner exception stack trace --- at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00000] in :0 at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in :0 at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in :0 at System.Configuration.ConfigurationSettings.GetConfig (System.String sectionName) [0x00000] in :0 at System.Diagnostics.DiagnosticsConfiguration.get_Settings () [0x00000] in :0 at System.Diagnostics.TraceImpl.InitOnce () [0x00000] in :0 at System.Diagnostics.TraceImpl.get_Listeners () [0x00000] in :0 at System.Diagnostics.Debug.get_Listeners () [0x00000] in :0 at MonoDevelop.Core.LoggingService..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at MonoDevelop.Ide.IdeStartup.Main (System.String[] args, MonoDevelop.Ide.Extensions.IdeCustomizer customizer) [0x00000] in :0

使用 sudo monodevelop 从shell运行monodevelop运行得很好.我已经清除了所有(我的意思是所有)mono软件包并重新安装,但错误仍然存​​在.我正在安装的软件包来自此处.

Running monodevelop from a shell using sudo monodevelop runs absolutely fine. I've purged all (and I do mean all) the mono packages and re-installed but the error persists. The packages I'm installing are from the mono package repository as outlined here.

这似乎是一个权限问题,但是我一生都无法找出可能导致此问题的文件夹或文件.我花了最后两天的时间来弄清楚这个问题,但是却一无所获,所以如果有人有任何想法或曾经遇到过这个问题,我很想听听.

It would seem to be a permissions issue but I can't for the life of me work out what folder or file could be causing this. I've spent the last 2 days trying to figure this out and have got absolutely nowhere at all, so if anyone has any ideas or has come across this problem before, I'd love to hear about it.

谢谢, 迈克

推荐答案

使用strace查找权限错误.通常,当一个程序只能以root用户身份运行时,这意味着某些文件是不可访问的,除非是root用户.

Look for permission errors with strace. Usually when a program can only be run as root it means that some files are unreachable, except when root.

strace monodevelop

我自己也遇到过同样的问题.我做到了

I had the same issue myself. I did

strace monodevelop > user.txt
sudo strace monodevelop > root.txt
diff user.txt root.txt > diff.txt

然后我搜索了有问题的文件.

And then I searched for the problematic files.

最后,这实际上并没有帮助我.我最终卸载并重新安装了mono,以及与此相关的所有内容.希望这两种解决方案都可以.

In the end this actually didn't help me. I eventually uninstalled, and reinstalled mono, and everything related to it. Hopefully either solution will help.

这篇关于Monodevelop-仅使用sudo运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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