xcode 如何在 OSx 10.9 上安装 libX11?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23643661/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:55:23  来源:igfitidea点击:

how to install libX11 on OSx 10.9?

xcodeosx-maverickscommand-line-tool

提问by Hershal P

I am trying to install ROOT (cern.root.ch). When I run ./configure , I get a message that libX11 is missing and must be installed.

我正在尝试安装 ROOT (cern.root.ch)。当我运行 ./configure 时,我收到一条消息,指出缺少 libX11 并且必须安装。

I did some research and found that I need to install

我做了一些研究,发现我需要安装

  1. ) XQuartz (I already have the latest version.)
  2. ) Command line tools in Xcode.
  1. ) XQuartz(我已经有了最新版本。)
  2. ) Xcode 中的命令行工具。

I tried installing Command Line Tools from apple's developer website. The installation goes through smoothly but how do I know whether it has been installed? I still get libX11 missing error with root's configure command.

我尝试从苹果的开发者网站安装命令行工具。安装很顺利,但我怎么知道它是否已经安装?我仍然使用 root 的配置命令出现 libX11 丢失错误。

I also tried xcode-select --install and it once went through smoothly and then later again gives error saying this package is no longer maintained - or something of that sort.

我也试过 xcode-select --install ,它曾经顺利通过,然后再次出错,说这个包不再维护 - 或者类似的东西。

I understand I may have multiple installations... But I am still facing the problem of not having libX11 and not being able to install ROOT.

我知道我可能有多个安装...但我仍然面临没有 libX11 并且无法安装 ROOT 的问题。

Thanks, Hershal.

谢谢,赫歇尔。

回答by KeepCalmAndCarryOn

This linkand the one referencedin it suggests you use homebrew (brew) to install it

链接及其中引用的链接建议您使用自制软件 ( brew) 来安装它

$ ruby <(curl -fsS https://raw.github.com/mxcl/homebrew/go)
$ brew doctor

Remember to add the Homebrew directory to your PATH by adding the directory (found with brew --prefix) to your .bashrc, .zshrc or whatever shell file you're using (.bashrc is the OS X default). We'll also add the XQuartz binaries to the PATH in case anything needs them in the future.

请记住通过将目录(使用 brew --prefix 找到)添加到您的 .bashrc、.zshrc 或您正在使用的任何 shell 文件(.bashrc 是 OS X 的默认值)来将 Homebrew 目录添加到您的 PATH。我们还将 XQuartz 二进制文件添加到 PATH 中,以防将来需要它们。

export PATH=/usr/local/bin:/opt/X11/bin:$PATH

Start a new Terminal session to pick up the changes.

启动一个新的终端会话以获取更改。

Now that Homebrew is installed, we can use it to install the required dependencies. Each may take some time as Homebrew generally compiles from source.

现在 Homebrew 已安装,我们可以使用它来安装所需的依赖项。每个都可能需要一些时间,因为 Homebrew 通常从源代码编译。

$ brew install gfortran # Fortran compiler
$ brew install python   # Python interpreter
$ brew install pcre     # Regular Expressions library
$ brew install fftw     # Fast Fourier Transforms
$ brew install cmake    # Cross-platform make

install root

安装根

$ brew tap homebrew/science
$ brew install --with-cocoa root

You don't say whether you have installed XCodeas well as the commandline tools but I think you will need it

你没有说你是否已经安装了XCode以及命令行工具,但我认为你会需要它