关于Macports的问题
我的 Mac 上刚刚安装了 Macports,操作系统版本是 Snow Leopard (10.6)。我使用 Macports 通过“sudo port install”命令安装了多个软件包,所有这些软件包在安装后都报告为活动的。我只是想知道这些软件包是否真的有效?例如,macports 告诉我“gcc44 @4.4.2_0 (active)”,但是在 python 中它显示“[GCC 4.0.1 (Apple Inc. build 5493)] on darwin”。
所以我只是想知道我的安装方法是否有问题或者我的macports安装后需要一些配置?
任何帮助表示赞赏!我对 Mac 操作系统确实是个新手。
I just got Macports installed on my mac, of which os version is Snow Leopard (10.6). I used Macports to install several packages through 'sudo port install' command, and all these packages are reported active after the installation. I just wonder that whether these packages are really working? For example, macports tells me that 'gcc44 @4.4.2_0 (active)', however in python it says '[GCC 4.0.1 (Apple Inc. build 5493)] on darwin'.
So I just want to know that if there is some problem with my method of installing or my macports needs some configuration after installation?
Any help is appreciated! I am really new in Mac OS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我相信Python正在声明用于构建它的gcc版本,它应该是Mac上安装的gcc,即Mac OS开发工具附带的版本。它应该位于 /usr/bin/gcc 中。
当您执行时,您应该会发现 gcc 版本匹配,
我认为您的设置或配置没有任何问题。它只是表明Python是使用Apple提供的gcc编译的
I believe Python is declaring the version of gcc used to build it which should be the gcc installed on your Mac i.e. the version that came with the Mac OS Development tools. This should be located in /usr/bin/gcc.
You should find the gcc version matches when you execute
I do not think anything is wrong with your setup or configuration. It just shows Python was compiled using the gcc provided by Apple
Macports 安装的软件不会与 Apple 提供的版本冲突。如果他们更换了 C 编译器和库,那么当 Apple 提供操作系统更新时可能会发生非常糟糕的事情。
gcc 是 Apple 版本的 gcc 的命令,位于 /usr/bin,Leopard 的版本为 4.0.1。
gcc-mp-4.4 是 MacPorts 提供的 gcc 4.4 版本的命令,位于 /opt/local/bin。
同样,/opt/local/bin 中也会有 python 版本。
与 houmam 一样,我更喜欢按名称显式调用版本。如果您想将特定版本连接到python,我认为MacPorts包python_select(现在已被port select python取代)通过使用符号链接来实现这一点。我从来没有用过它。
Macports installs software not to conflict with the versions provided by Apple. If they replaced the C compiler and libraries, really bad things might happen when Apple provided operating system updates.
gcc is the command for Apple's version of gcc, at /usr/bin and version 4.0.1 for Leopard.
gcc-mp-4.4 is the command for gcc version 4.4 as provided by MacPorts, located at /opt/local/bin.
Similarly there will be versions of python in /opt/local/bin.
Like houmam, I prefer to explicitly invoke versions by name. If you want to connect particular versions to python, I think that the MacPorts package python_select (this has now been replace by port select python) implements this by using symbolic links. I've never used it.
可能只是构建选择的编译器是 XCode 安装的编译器。您可以尝试输入 which gcc 来查看您的路径中是哪一个。默认情况下,macports 位于 /opt/local 某处。
It probably is just that compiler that was picked by the build was that installed by XCode. You can try typing which gcc to see which one is in your path. The macports one would by default be in /opt/local somewhere.