在苹果OSX狮子上,使其不进入路径 [英] on apple osx lion, make not in path

查看:107
本文介绍了在苹果OSX狮子上,使其不进入路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Apple和osx还是陌生的.我从应用程序商店安装了xcode,现在我的文件系统中有一个make-executable:

I am fairly new to apple and osx. I installed xcode from the app store, and now I have a make-executable in my filesystem:

192:~ herbert$ locate make | grep bin
/Applications/Xcode.app/Contents/Developer/usr/bin/gnumake
/Applications/Xcode.app/Contents/Developer/usr/bin/make
/opt/X11/bin/gccmakedep
/opt/X11/bin/makedepend
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/cross/m68k-elf-binutils/files/binutils-makeinfo-check.patch
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/cross/mipsel-linux-binutils/files/300-001_ld_makefile_patch.patch
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/libinchi-1/files/patch-INCHI-1-API_INCHI_API_gcc_so_makefile-makefile.diff
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/indi/files/patch-libindi.pc.cmake.diff
/usr/X11/bin/gccmakedep
/usr/X11/bin/makedepend
/usr/bin/makeinfo
/usr/sbin/makedbm
192:~ herbert$

不幸的是,它不在我的路上.由于将/Application/Xcode.app/Content/Developer/usr/bin/附加到我的路径中是一种选择,因此似乎不应该这样做.我可以以某种方式将其安装到/usr/...或/opt/local/...吗?

Unfortunately it is not in my path. As appending /Application/Xcode.app/Content/Developer/usr/bin/ to my path would be an options, it seems as something not to do. Can I somehow install it to /usr/... or /opt/local/...?

192:~ herbert$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
192:~ herbert$ 

推荐答案

如果要从命令行进行构建,则必须安装命令行工具(或旧版本的Unix开发工具).

You have to install the Command Line Tools (or Unix Development Tools, in older versions) if you want to build from the command line.

在4.3.1中,执行此操作的方法是启动Xcode,打开首选项",单击下载"选项卡,单击组件"子选项卡,然后单击命令行工具"旁边的安装"按钮.

In 4.3.1, the way to do this is to launch Xcode, open Preferences, click the Downloads tab, click the Components sub-tab, and click the Install button next to "Command Line Tools".

在早期版本中,等效项可能是自动的,或者可能是初始安装程序中的选择,或者可能是要运行的单独安装程序.

In earlier versions, the equivalent may be automatic, or it may be a choice in the initial installer, or it may be a separate installer to run.

还有xcrun工具,可让您使用工具链而无需安装CLT,对于简单的任务,例如,可以将CC设置为xcrun clang,将MAKE设置为xcrun make,等等. ,甚至将xcrun硬链接到/usr/local/bin/clang/usr/local/bin/make等.但是以这种方式设置所有内容需要大量工作,并且仍然不足以构建许多源代码分发的项目.

There's also the xcrun tool, which lets you use the toolchain without installing the CLT, and for simple tasks you can, e.g., set CC to xcrun clang, MAKE to xcrun make, etc., or even hard-link xcrun to /usr/local/bin/clang, /usr/local/bin/make, etc. But setting up everything this way is a lot of work, and it still isn't sufficient to build many source-distributed projects.

这篇关于在苹果OSX狮子上,使其不进入路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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