Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cmake: command not found on macOS

After adding this line in my Podfile:

pod 'PiwikTracker', :git => 'https://github.com/manuroe/matomo-sdk-ios.git', :branch => 'feature/CustomVariables'  

The below error is occuring:

[!] /bin/bash -c 
set -e
echo `pwd`
sed -i '' 's/include <\(cmark.*\)>/include "\1"/' src/cmark.h
mkdir -p build; cd build && cmake -G Xcode ..

/Users/mac1/Library/Caches/CocoaPods/Pods/Release/cmark/0.24.1-ec027
/bin/bash: line 4: cmake: command not found

Can anyone help me with this issue?

like image 768
James Matthew Avatar asked Sep 27 '18 07:09

James Matthew


People also ask

Is CMake on Mac?

Getting and Installing CMake on Your Computer On many systems, you may find that CMake is already installed or is available for installation with the standard package manager tool for the system. Cygwin, Debian, FreeBSD, OS X MacPorts, Mac OS X Fink, and many others all have CMake distributions.

How do I know if CMake is installed?

You can check your CMake version by using the command cmake --version. cmake version 3.11.

How use CMake command line?

Running CMake from the command line From the command line, cmake can be run as an interactive question and answer session or as a non-interactive program. To run in interactive mode, just pass the option “-i” to cmake. This will cause cmake to ask you to enter a value for each value in the cache file for the project.

How do I install CMake on Mac OS X?

macOS There are pre-compiled binaries available on the Download page for macOS as disk images and tarballs. After copying CMake.app into /Applications (or a custom location), run it and follow the “How to Install For Command Line Use” menu item for instructions to make the command-line tools (e.g. cmake ) available in the PATH .

Why is the “command not found” message in the MAC command line?

The four most common reasons why you may see the “command not found” message in the Mac command line are as follows: the command you are attempting to run is not installed

Why is my command not working on my Mac?

The four most common reasons why you may see the “command not found” message in the Mac command line are as follows: the command syntax was entered incorrectly the command you are attempting to run is not installed the command was deleted, or, worse, the system directory was deleted or modified the ...

How do I run a pre-compiled binary on CMake?

Once the binary is installed, run it on CMake as you would any other project. Typically this means selecting CMake as the Source directory and then selecting a binary directory for the resulting executables. There are pre-compiled binaries available on the Download page for macOS as disk images and tarballs.


2 Answers

Use Brew to install cmake

brew install cmake
like image 168
Matt Avatar answered Oct 24 '22 02:10

Matt


Install Brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Use Brew to install cmake

brew install cmake 
like image 5
Sourabh Sharma Avatar answered Oct 24 '22 02:10

Sourabh Sharma