XQuartz 无法在 Mac 10.9 Maverick 上启动 - 无限失败循环

XQuartz 无法在 Mac 10.9 Maverick 上启动 - 无限失败循环

我一直无法在 Mac 10.9(又名 Maverick)上运行 XQuartz。我多次安装和卸载 XQuartz,但无济于事。

我从 Console.app 收到的错误消息是:

10/01/2014 15:01:21.148 org.macosforge.xquartz.X11.stub[4821]: Xquartz: bootstrap_look_up(): Unknown service name
10/01/2014 15:01:22.099 org.macosforge.xquartz.startx[4675]: waiting for X server to begin accepting connections 
10/01/2014 15:01:22.099 org.macosforge.xquartz.startx[4675]: /opt/X11/bin/xinit: giving up
10/01/2014 15:01:22.099 org.macosforge.xquartz.startx[4675]: /opt/X11/bin/xinit: unable to connect to X server: Operation timed out
10/01/2014 15:01:22.099 org.macosforge.xquartz.startx[4675]: waiting for X server to begin accepting connections /opt/X11/bin/xinit: server error
10/01/2014 15:01:22.106 org.macosforge.xquartz.startx[4675]: waiting for X server to begin accepting connections 
10/01/2014 15:01:22.392 org.macosforge.xquartz.startx[4829]: xauth:  file /Users/chutsu/.serverauth.4830 does not exist
10/01/2014 15:01:22.854 org.macosforge.xquartz.X11.stub[4975]: Xquartz: Unable to locate waiting server: org.macosforge.xquartz.X11
10/01/2014 15:01:22.860 org.macosforge.xquartz.X11.stub[4976]: Xquartz: Starting X server: /Applications/Utilities/XQuartz.app/Contents/MacOS/X11 --listenonly
10/01/2014 15:01:22.894 org.macosforge.xquartz.startx[4829]: open terminal failed: not a terminal
10/01/2014 15:01:24.857 org.macosforge.xquartz.startx[4829]: 
10/01/2014 15:01:26.859 org.macosforge.xquartz.startx[4829]: waiting for X server to begin accepting connections 
10/01/2014 15:01:28.862 org.macosforge.xquartz.startx[4829]: waiting for X server to begin accepting connections 
10/01/2014 15:01:30.864 org.macosforge.xquartz.startx[4829]: waiting for X server to begin accepting connections 
10/01/2014 15:01:32.867 org.macosforge.xquartz.startx[4829]: waiting for X server to begin accepting connections 
10/01/2014 15:01:34.870 org.macosforge.xquartz.startx[4829]: waiting for X server to begin accepting connections 
10/01/2014 15:01:36.873 org.macosforge.xquartz.startx[4829]: waiting for X server to begin accepting connections 
10/01/2014 15:01:38.876 org.macosforge.xquartz.startx[4829]: waiting for X server to begin accepting connections 
10/01/2014 15:01:40.879 org.macosforge.xquartz.startx[4829]: waiting for X server to begin accepting connections 
10/01/2014 15:01:42.883 org.macosforge.xquartz.startx[4829]: waiting for X server to begin accepting connections 

并且它会一直重复下去。我用来删除 XQuartz 的代码如下(在终端中):

sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg

答案1

Xquartz:bootstrap_look_up():未知的服务名称

这表明您没有按照安装程序的指示注销并重新登录。

但这不应该是一个致命的问题。

最可能的解决方案是你的 shell 初始化脚本有问题。你可以这样做来测试:

sudo mv /Applications/Utilities/XQuartz.app/Contents/MacOS/X11{,.bak}
sudo mv /Applications/Utilities/XQuartz.app/Contents/MacOS/X11{.bin,}

测试后,您可以通过以下方式撤消: sudo mv /Applications/Utilities/XQuartz.app/Contents/MacOS/X11{,.bin} sudo mv /Applications/Utilities/XQuartz.app/Contents/MacOS/X11{.bak,}

答案2

您的 .bashrc 或 .profile 在非交互时是否退出?

这些症状与我在 Mac OS Mavericks 系统中看到的症状类似。许多网络搜索都显示有人遇到类似问题。有些回复(如果有的话)建议“您的 .profile 或 .bashrc 有问题”。我的回复表面上看起来是正确的。

我最终发现我的 .profile 正在“获取”我的 .bashrc,而我的 .bashrc 有一个古老的交互性测试:

# If not running interactively, don't do anything [ -z "$PS1" ] && exit

将“退出”改为“返回”就成功了。

相关内容