I am trying to install mySQL on macOS Mojave. I have installed mySQL Community Server 8.0.17 and then attempted to configure the command line to recognize mySQL commands by using the following code in Terminal:
echo ‘export PATH=/usr/local/mysql/bin:$PATH’ >> ~/.bash_profile
Followed by:
.~/.bash_profile
After entering this last line of code, I get the following message:
-bash: ‘export: command not found
Can anyone help me to troubleshoot this problem. I'm new to coding, so I'm not sure how to rectify this error. Thank you for your help.
The problem is in:
echo ‘.......’ >> ~/.bash_profile
in your quotes. Seems you are using TextEdit app or Notes app which by default translate normal quotes
'
into
’
So this will work for you:
echo 'export PATH=/usr/local/mysql/bin:$PATH' >> ~/.bash_profile
Related
Looks like I have managed to scramble my path variable when installing flutter, and now running yarn, shows zsh: command not found: yarn
This was the command I ran that I started experiencing the zsh command not found:
echo 'export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin >> ~/.zshrc"
I ran the code solution suggested by #devnull https://stackoverflow.com/a/18428774/1766068
PATH=/bin:/usr/bin:/usr/local/bin:${PATH}
export PATH it would work when I open a new tab, but if I should restart the terminal it no longer works.
Open your ~/.zshrc file in a text editor and remove the last line. Then logout and login again.
I've seen other posts with this issue (cf : "exp: command not found" How do I add expo cli to path?)
But still i cannot resolve this issue...
here is a screenshot of my config.
Please someone have a solution? of maybe i did bad ?
Thanks a lot :)
Seems you are using ZSH, in this case you need to configure your path in ~/.zshrc file and not in the .bash_profile that only will be load by bash
echo 'export PATH=$PATH:$HOME/.npm-global/bin' >> ~/.zshrc and then reload the config with source .zshrc.
On my Macbook, the integrated terminal in VSCODE which is using bash shell is throwing the error "bash: :echo: command not found" as soon as I open it and on every command that I execute in it.
But I dont see this error in my iterm or Terminal though. They both work fine. I am getting this error only in VSCode integrated terminal
It was not happening previously. I am not sure what got changed recently.
I checked if the same issue is happening in iterm and Terminal also or not. But it doesn't happen in them.
Checked the .bash_profile and .bashrc files. But they seem to be fine.
Only place I can find echo command in my bash_profile:
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007";':"$PROMPT_COMMAND";
fi
.bashrc doesn't contain any echo commands
Please let me know why this error is coming in vscode integrated terminal only and how to fix it.
Instead of this:
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007";':"$PROMPT_COMMAND";
Try this one:
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"';
Whenever I start up Terminal on my Macbook Air, I get this message:
-bash: ≈: command not found
How do I fix this error? I'm running Mavericks version 10.9.4 if that helps at all.
EDIT: Fixed this error by using the bash -x method, found out it was a random '≈' character left in ~/.profile that needed to be deleted. Thanks for the answers :)
To debug you can try this:
bash -x -l
(the -l might not be needed).
I definitely agree with Barmar, there is something in your bash startup scripts.
There is not a great way to do this, but here is the protocol to remedy it.
Confirm it is your bash profile by first killing the process with a control + C if it is hung. Then do a source ~/.bash_profile and see if you get that same error.
Backup your bash profile cp ~/.bash_profile bashprofile.txt
Then comment out part of your bash profile. With text wrangler you can do a command + slash.
Save, then do a source ~/.bash_profile and see if the error still prints.
Repeat with different areas of the script until you have isolated the infected region.
I recently updated some applications and now it is giving me error when I open any new tab in teminal.
Error it is giving:
/Users/priti/.oh-my-zsh/lib/completion.zsh:28: command not found:
whoami /Users/priti/.oh-my-zsh/lib/theme-and-appearance.zsh:10:
command not found: uname
/Users/priti/.oh-my-zsh/lib/theme-and-appearance.zsh:14: command not
found: uname getent:4: command not found: grep
I am sure something is wrong with the updated zshrc file, but I am not able to figure out what exactly the problem in that.
Problems I have faced till now are vi and grepcommand not working.For both output is command not found.
Thanks in advance for the same.
Reinstalling zsh solved the problem.
Some steps I followed after brew update might have caused this problem.