zsh is not finding my php executable - zsh

I'm using zsh on my Ubuntu VPS.
When I try to find version
php -v
zsh: command not found: php
and my php executable somehow got into
whereis php
php: /usr/share/php
How can I point it to right path?

export PATH=$PATH:/usr/share/php/bin
Add this to your .zshrc (assuming /usr/share/php/bin is the directory in which the php binary lives).

Ho you have to over write all commands to zsh
try this
PATH=/bin:/usr/bin:/usr/local/bin:${PATH}
export PATH

Just reinstall PHP and overwrite any previous installation with this:
brew link --overwrite php

Related

How to hide terminal warning when Oh-my-ZSH plugin can't access external app

I've been using oh-my-zsh for a while and it's working great. I'd like to use the command-line fuzzy finder plugin so I enabled it in .zshrc:
plugins=(fzf)
However if "fzf" is not installed I get a warning when opening my terminal window:
[oh-my-zsh] fzf plugin: Cannot find fzf installation directory.
Please add export FZF_BASE=/path/to/fzf/install/dir to your .zshrc
Is there a way to hide that warning message? When I install fzf with "sudo dnf install fzf" the warning dissapears, but maybe I want to clone my dotfiles on a different computer where it is not available and it's not that important to be there.
you should first install fzf, in Mac and i use the following command to install brew install fzf
You need to have fzf installed to use this plugin; otherwise remove it. It won't do anything without first installing fzf. Sudo apt install fzf
You can put the plugins= line inside an if statement that checks for the presence of fzf in your path. For example:
if [[ -n $(command -v fzf) ]] ; then
echo "fzf found, loading oh-my-zsh fzf plugin"
plugins=(vi-mode fzf)
else
echo "no fzf was found in the path"
plugins=(vi-mode)
fi
command -v is similar to which, but is superior for this context as explained in this answer.
The -n makes the [[ ]] evaluate as true whenever the $() produces a non-empty output.
For me, it was also very important that brew itself was in Path of ~/.zshenv like so:
export PATH=/opt/homebrew/bin:$PATH
Installed FZF with brew on an M1 Mac.
Otherwise, the error occurs:
[oh-my-zsh] fzf plugin: Cannot find fzf installation directory.
Please add `export FZF_BASE=/path/to/fzf/install/dir` to your .zshrc
When you install fzf by using brew, it needs to be set brew env.
You can solve to set PATH for fzf before the line of plugins=(fzf) in .zshrc file.
But, I recommand creating "$HOME/.zprofile" as following.
For m1 Mac.
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/opt/homebrew/bin/brew shellenv)"
For, intel Mac
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/usr/local/bin/brew shellenv)"

Command not found

I want use oh-my-zsh jhipster plugin. I followed Jhipster guidelines using
http://www.jhipster.tech/oh-my-zsh/
After setting up everything, whenever i try to use command jh, it doesn't work. I get response
zsh: command not found
I'm not familiar with shell scripting language. Please help me.
Yes, you need to:
install zsh
install oh-my-zsh
configure your default shell to use zsh -> it is important
install jhipster-oh-my-zsh-plugin
Here the commands we do for our jhipster-devbox (on Ubuntu):
https://github.com/jhipster/jhipster-devbox/blob/master/scripts/setup.sh#L100-L112
Did you installed zsh?
I am not familiar with MAC, but it should be something like:
brew install zsh zsh-completions
here some more in-deep instructions:
http://sourabhbajaj.com/mac-setup/iTerm/zsh.html

Opening the atom editor from iTerm2 window is displaying - 'zsh: command not found: atom'

Just installed iTerm2 with oh-my-zsh, with atom already installed..
I have cloned a git repo of mine to use on an older laptop and for some reason oh-my-zsh is not opening my atom on the usual command.
➜ LandingPage git:(master) atom .
zsh: command not found: atom
Tried rectifying it by accessing and changing the .zshrc file but permission is denied. Anyone any suggestions?
Thanks,
Ant
As per this question/answer it looks like atom may not have created a symlink to the atom command.
This has nothing to do with zsh -- the first argument is just telling you the shell, the information after it is the error.
For example on my machine (which doesn't have atom) when running zsh and trying to open a file with atom I get zsh: command not found: atom. When I try the same command with bash, I get bash: atom: command not found.
Let me know if the above link doesn't work! Hopefully this helps.

Unable to install namerctl

I have the following version of go on my ubuntu, I am unable to install namerd, Please find the image below.
go version go1.6 linux/amd64
Running go get -u github.com/linkerd/namerctl will install the executable into your $GOPATH/bin directory. You need to make sure that directory is included in your shell's $PATH in order to use namerctl from the command line.

Trying to install Theos

I'm trying to install Theos on my iMac using the instructions from HERE.
It seems to have installed correctly, but when I try to set up a new project in terminal using:
$THEOS/bin/nic.pl
It says:
-bash: /bin/nic.pl: No such file or directory
Any help would be great!
You should unhide your OSX hidden files using this command through TERMINAL :
defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder
Then open .bash_profile under your USERNAME folder
[edit]
if .bash_profile doesn't existe
Open TERMINAL then write
touch .bash_profile
Then
open -a TextEdit.app .bash_profile
Then add this line inside
export THEOS=/opt/theos
Good luck
If you followed the guide of iphonedevwiki you should have all that you need to use theos. The correct way to call nic.pl should be:
sudo su
/opt/theos/bin/nic.pl

Resources