我在哪里可以找到Mac OS X Lion的“make”程序?

时间:2022-04-07 03:13:58

Just upgraded my computer to Mac OS X Lion and went to terminal and typed "make" but it says: -bash: make: command not found

刚刚把我的电脑升级到Mac OS X Lion,然后去终端输入“make”,但它说:-bash: make:命令没有找到。

Where did the "make" command go?

“make”命令到哪里去了?

9 个解决方案

#1


50  

Have you installed Xcode and the developer tools? I think make, along with gcc and friends, is installed with that and not before. Xcode 4.1 for Lion is free.

您已经安装了Xcode和开发工具吗?我认为,与gcc和朋友一起,是安装了这个,而不是以前。Xcode 4.1对Lion是免费的。

#2


531  

You need to install Xcode from App Store.

您需要从App Store安装Xcode。

Then start Xcode, go to Xcode->Preferences->Downloads and install component named "Command Line Tools". After that all the relevant tools will be placed in /usr/bin folder and you will be able to use it just as it was in 10.6.

然后启动Xcode,转到Xcode->首选项->下载并安装名为“命令行工具”的组件。在此之后,所有相关的工具将被放置在/usr/bin文件夹中,您将能够像在10.6中那样使用它。

#3


30  

It appears you can install the command line tools without getting Xcode from Downloads for Apple Developers. It required me to login with my apple account.

看起来,您可以安装命令行工具,而不需要为苹果开发人员下载Xcode。它要求我用我的苹果账号登录。

Alternatively, once you install Xcode from the app store, you might notice the command line tools are not installed by default. Open Xcode, go to preferences, click to the "downloads" tab, and from there you can download and install command line tools.

或者,一旦您从应用程序商店安装Xcode,您可能会注意到命令行工具没有默认安装。打开Xcode,转到首选项,点击“下载”选项卡,从那里你可以下载和安装命令行工具。

#4


21  

Xcode 4.3.2 didn't install "Command Line Tools" by default. I had to open Xcode Preferences / Downloads / Components Tab. It had a list of optional components with an "Install" button beside each. This includes "Command Line Tools" and components to support developing for older versions of iOS.

Xcode 4.3.2没有默认安装“命令行工具”。我必须打开Xcode Preferences / Downloads / Components选项卡。它有一个可选组件列表,每个组件旁边都有一个“Install”按钮。这包括“命令行工具”和组件,以支持对旧版本的iOS进行开发。

Now "make" is available and you can check by opening terminal and typing:make -v

现在“make”是可用的,您可以通过打开终端和键入:make -v来检查。

The result should look like:GNU Make 3.81

结果应该是:GNU Make 3.81。

You may need "make" even if you don't need Xcode, such as a Perl developer installing Perl Modules using cpan -i on the commandline.

您可能需要“make”,即使您不需要Xcode,比如Perl开发人员使用cpan -i在命令行上安装Perl模块。

#5


4  

Xcode 5.1 no longer provides command line tools in the Preferences section. You now go to https://developer.apple.com/downloads/index.action, and select the command line tools version for your OS X release. The installer puts them in /usr/bin.

Xcode 5.1不再在Preferences部分提供命令行工具。现在,您将访问https://developer.apple.com/downloads/index.action,并为您的OS X版本选择命令行工具版本。安装程序将它们放在/usr/bin中。

#6


3  

If you installed xcode and upgraded to mountain lion, or you don't have the latest command line tools installed, or you have zsh or other shells, you can shortcut to some of the embedded tools in the developer directory with:

如果您安装了xcode并升级到mountain lion,或者您没有安装最新的命令行工具,或者您有zsh或其他shell,那么您可以在开发人员目录中的一些嵌入式工具中使用:

xcrun make

#7


3  

After upgrading to Mountain Lion using the NDK, I had the following error:

使用NDK升级到Mountain Lion后,我有以下错误:

Cannot find 'make' program. Please install Cygwin make package or define the GNUMAKE variable to point to it

找不到“使”计划。请安装Cygwin制作包或定义GNUMAKE变量以指向它。

Error was fixed by downloading and using the latest NDK

错误是通过下载和使用最新的NDK修复的。

#8


2  

If you need only make and friends. Try installing the command-line-tools provided by Apple. (Assuming you are not doing any iOS development.)

如果你只需要结交朋友。尝试安装Apple提供的命令行工具。(假设你没有做任何iOS开发。)

#9


0  

there are specific builds of command line tools for different major OSX versions available from the Downloads for Apple Developers site. Be sure to get the latest release of the version for your OS.

在苹果开发者站点的下载中,有针对不同主要OSX版本的命令行工具的具体构建。一定要为您的操作系统获得最新版本的版本。

#1


50  

Have you installed Xcode and the developer tools? I think make, along with gcc and friends, is installed with that and not before. Xcode 4.1 for Lion is free.

您已经安装了Xcode和开发工具吗?我认为,与gcc和朋友一起,是安装了这个,而不是以前。Xcode 4.1对Lion是免费的。

#2


531  

You need to install Xcode from App Store.

您需要从App Store安装Xcode。

Then start Xcode, go to Xcode->Preferences->Downloads and install component named "Command Line Tools". After that all the relevant tools will be placed in /usr/bin folder and you will be able to use it just as it was in 10.6.

然后启动Xcode,转到Xcode->首选项->下载并安装名为“命令行工具”的组件。在此之后,所有相关的工具将被放置在/usr/bin文件夹中,您将能够像在10.6中那样使用它。

#3


30  

It appears you can install the command line tools without getting Xcode from Downloads for Apple Developers. It required me to login with my apple account.

看起来,您可以安装命令行工具,而不需要为苹果开发人员下载Xcode。它要求我用我的苹果账号登录。

Alternatively, once you install Xcode from the app store, you might notice the command line tools are not installed by default. Open Xcode, go to preferences, click to the "downloads" tab, and from there you can download and install command line tools.

或者,一旦您从应用程序商店安装Xcode,您可能会注意到命令行工具没有默认安装。打开Xcode,转到首选项,点击“下载”选项卡,从那里你可以下载和安装命令行工具。

#4


21  

Xcode 4.3.2 didn't install "Command Line Tools" by default. I had to open Xcode Preferences / Downloads / Components Tab. It had a list of optional components with an "Install" button beside each. This includes "Command Line Tools" and components to support developing for older versions of iOS.

Xcode 4.3.2没有默认安装“命令行工具”。我必须打开Xcode Preferences / Downloads / Components选项卡。它有一个可选组件列表,每个组件旁边都有一个“Install”按钮。这包括“命令行工具”和组件,以支持对旧版本的iOS进行开发。

Now "make" is available and you can check by opening terminal and typing:make -v

现在“make”是可用的,您可以通过打开终端和键入:make -v来检查。

The result should look like:GNU Make 3.81

结果应该是:GNU Make 3.81。

You may need "make" even if you don't need Xcode, such as a Perl developer installing Perl Modules using cpan -i on the commandline.

您可能需要“make”,即使您不需要Xcode,比如Perl开发人员使用cpan -i在命令行上安装Perl模块。

#5


4  

Xcode 5.1 no longer provides command line tools in the Preferences section. You now go to https://developer.apple.com/downloads/index.action, and select the command line tools version for your OS X release. The installer puts them in /usr/bin.

Xcode 5.1不再在Preferences部分提供命令行工具。现在,您将访问https://developer.apple.com/downloads/index.action,并为您的OS X版本选择命令行工具版本。安装程序将它们放在/usr/bin中。

#6


3  

If you installed xcode and upgraded to mountain lion, or you don't have the latest command line tools installed, or you have zsh or other shells, you can shortcut to some of the embedded tools in the developer directory with:

如果您安装了xcode并升级到mountain lion,或者您没有安装最新的命令行工具,或者您有zsh或其他shell,那么您可以在开发人员目录中的一些嵌入式工具中使用:

xcrun make

#7


3  

After upgrading to Mountain Lion using the NDK, I had the following error:

使用NDK升级到Mountain Lion后,我有以下错误:

Cannot find 'make' program. Please install Cygwin make package or define the GNUMAKE variable to point to it

找不到“使”计划。请安装Cygwin制作包或定义GNUMAKE变量以指向它。

Error was fixed by downloading and using the latest NDK

错误是通过下载和使用最新的NDK修复的。

#8


2  

If you need only make and friends. Try installing the command-line-tools provided by Apple. (Assuming you are not doing any iOS development.)

如果你只需要结交朋友。尝试安装Apple提供的命令行工具。(假设你没有做任何iOS开发。)

#9


0  

there are specific builds of command line tools for different major OSX versions available from the Downloads for Apple Developers site. Be sure to get the latest release of the version for your OS.

在苹果开发者站点的下载中,有针对不同主要OSX版本的命令行工具的具体构建。一定要为您的操作系统获得最新版本的版本。