CMake installation - ios

I installed CMake (on ios), and it seemed like the installation was completed.
However, when I type
cmake -version
I get
-bash: cmake: command not found
Is there a need to set up CMake before using it?

Assuming you're talking about OS X, not iOS: CMake is installed, but not in the PATH in your shell. You can add it via something like:
PATH=$PATH:/Appications/CMake.app/Contents/bin
Then the cmake command will work on the command line.
You can edit the file ~/.bashrc to set your PATH this way every time you open the command line, instead of needing to do it manually each time.
https://en.wikipedia.org/wiki/PATH_(variable)

you can open CMake with GUI in Launchpad, and click the "tools" - > "How to Install For Command Line Use" menu, you'll find ways to solve it

The previous answer pointing to /Applications/CMake.app/Contents/bin is correct but you can go one step further.
If you run
/Applications/CMake.app/Contents/bin/cmake-gui --install
Then it will link the executables into /usr/local/bin.

Related

Brew install nvm. nvm: command not found

After installing nvm with brew, and running nvm, it says nvm: command not found
How can I get the command to execute?
There are two steps to installing nvm with brew.
First use brew to install the application:
brew install nvm
Then take a look at the brew info "caveats" section, to see what else you have to do:
brew info nvm
You might see something like (this can change!):
You should create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
Add the following to ~/.bash_profile or your desired shell
configuration file:
export NVM_DIR="$HOME/.nvm"
. "/usr/local/opt/nvm/nvm.sh"
If you do not have a ~/.bash_profile file, then you can simply create one.
Make sure to restart your terminal before trying to run the nvm command again.
I followed #user3207874's answer, but it still wasn't working for me. I had to run this command after those steps:
source $(brew --prefix nvm)/nvm.sh
From the docs:
Your system may not have a [.bash_profile file] where the command is
set up. Simply create one with touch ~/.bash_profile and run the
install script again
you might need to restart your terminal instance. Try opening a new
tab/window in your terminal and retry.
Restarting worked for me...Why can't all bugs be so easy?!!
Just adding some explanation for Aaditya's answer to explain why it works. I can't replay because I don't have enough reputation.
Basically there are 2 important steps to follow
Export NVM_DIR location. You need to create this folder if it doesn't exist first.
export NVM_DIR="$HOME/.nvm"
Second you need to source nvm's script. It is usually like this
. "/usr/local/opt/nvm/nvm.sh"
If the path on the second step does work it may be because the path is different in your device. One easy way to find its path is with the command
brew --prefix nvm
The output will be the path for the nvm installation directory in which the nvm.sh file resides. Setting the command inside $() will create a subshell to get that path. We can use it to source the nvm.sh script wherever it is located like this:
. $(brew --prefix nvm)/nvm.sh
Using that command is a replacement for . "/usr/local/opt/nvm/nvm.sh" in your .bash_profile.
please run this command
source ~/.nvm/nvm.sh
I had the same problem after running npm install
The following solution worked for me:
Run brew doctor to find broken symlinks for NPM
Run brew cleanup to clean them up
Just adding some new info.
The docs for nvm have this note:
Homebrew installation is not supported. If you have issues with homebrew-installed nvm, please brew uninstall it, and install it using the instructions below, before filing an issue.
So for anyone coming here, potentially uninstall via brew and install as per recommendation : https://github.com/nvm-sh/nvm

'openssl/rsa.h' file not found

I am using ccavenue as the payment gateway. I am getting "'openssl/rsa.h' file not found" this error while running the application.
Is there any way to add openssl via cocoapods or avoid this issue.
Thanks in advance.
If you have come across this sha.h not found error on a Mac/ios development, it is because Apple dropped support for openssl.(I faced this error in my macOs-mojave version)
refer to this link : https://www.anintegratedworld.com/mac-osx-fatal-error-opensslsha-h-file-not-found/
You can follow below mentioned steps as a work around for this issue.
brew install openssl
This will install a folder called openssl into your /usr/local/Cellar folder (where all your other brew downloads reside)
2.cd /usr/local/include
3.ln -s ../opt/openssl/include/openssl .
The trick though is to go into your usr/local/includes folder and create a symlink (aka folder shortcut in the windows world) to your Cellar folder. (Step 2)
ln is to create a link and -s means it is symbolic. Next we are saying what is the destination and the . (dot) indicates to create the link in the current directory. (Step 3)
Now when you compile the code, the warning should disappear because your compiler will search in this directory (one of many standard directories) and find the header file sha.h via the shortcut link.
You should probably run a few other commands as best practise:
brew doctor
brew update
brew upgrade
This will resolve issue.
Note : I faced this particular issue (openssl/rsa.h file not found) when i was trying to install 'RSclient' package in my R environment.

Installing Chisel

I'm trying to install Chisel.
I ran the following commands in command line.
brew update
brew install chisel
the final step is to follow the instructions that Homebrew displays to add chisel to your ~/.lldbinit.
I cannot find .lldbinit file. Any ideas?
I figured it out. Simply create .lldbinit in your home directory. I used sublime and added the following text to the file.
# ~/.lldbinit
...
command script import /path/to/fblldb.py
make sure you update the 'path' portion with your actual path. This can be obtained from command line when you do 'brew install chisel'
Save, restart Xcode. Done!
.lldbinit file is not required for lldb to work so it is not created by default. If you don't have it already just create new empty file and add all necessary lines to it.

Appium doctor shows error

When I run Appium doctor it shows:
Running iOS Checks
✖ Unknown SW Version Command: Error: Command failed: /bin/sh -c sw_vers -productVersion
/bin/sh: sw_vers: command not found
Appium-Doctor detected problems. Please fix and rerun Appium-Doctor.
Can anyone help let me know what is the wrong here?
running this solved my problem:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
You need to install the command line tools as marked in your message:
✖ Xcode Command Line Tools are NOT installed
From osxDaily:
Launch the Terminal, found in /Applications/Utilities/
Type the following command string:
xcode-select --install
A software update popup window will appear that asks: “The xcode-select command requires the command line developer tools. Would you like to install the tools now?” choose to confirm this by clicking “Install”, then agree to the Terms of Service when requested (feel free to read them thoroughly, we’ll be here)
Wait for the Command Line Tools package download to complete, it’ll be about 130MB and installs fairly quickly depending on your connection speed
The installer goes away on its own when complete, and you can then confirm everything is working by trying to use one of the commands that were just installed, like gcc, git, svn, rebase, make, ld, otool, nm, whatever you want from the list below. Assuming the installation went uninterrupted, the command will execute as expected. This also means you can compile and install things from source code directly without having to use a package manager. Enjoy your new unix command line toolkit!
Have you tried upgrading to the latest Appium version? Are you installing Appium through terminal? My appium-doctor issues were fixed after I installed Appium through terminal and updated the path variables in .bash profile. Appium desktop application is different than one installed through command line.
There are only two possible area which causing that error:
You need to keep all path veriable updated and correct in .bash_profile
You must install
XCode
NodeJS
properly. You must have all permission to access those.
Install all latest version of following things
JDK (Java Development Kit),
Xcode ,
Command Line tools ,
APPIUM For MAC OS
In my case, xcode command line tool isn't set. Simply go to Xcode>Preferences>Locations>Select desired Xcode version in Command Line Tools. OR from terminal follow Chhagan's answer xcode-select -s your path

Problems installing iOS PonyDebugger

I am trying to install PonyDebugger. I am typing into the terminal the commands
curl -sk https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py | \
python - --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebugger
and installing the script and the files with success.
However, when I type ponyd serve --listen-interface=127.0.0.1, i receive from the terminal -bash: ponyd: command not found.
Any solutions on how to move from this step? I already installed XCode command line tools.
One of the PonyDebugger developers here. Try adding /usr/local/bin to your PATH.
An alternative is to run ponyd directly from the installation path.
~/Library/PonyDebugger/bin/ponyd serve --listen-interface=127.0.0.1

Resources