I was working on installing MongoDB and following some steps I found online. Somehow I broke the terminal because every time I load my terminal I get:
-bash: uname: command not found
-bash: ps: command not found
-bash: dirname: command not found
-bash: dirname: command not found
-bash: dirname: command not found
-bash: dirname: command not found
-bash: brew: command not found
Also tried to go back into VIM to fix a path and I get
bash: vim: command not found
Any way to reset the terminal to fix this?
My view: Terminal Window
Run this to get a sane PATH again:
export PATH=$(/usr/bin/getconf PATH)
If they exist, you may want to source these files:
cd
. ./.profile
. ./.bashrc
Related
I am trying to fix the problem with MySQL Server. When I type in terminal MySQL I get command not found.
I know I have to edit .bash_profile file and add to it this line:
export PATH=${PATH}:/usr/local/mysql/bin
The problem is I can't write to it. I tried these commands:
brackets ~/.bask_profile
sudo brackets ~/.bash_profile
touch ~/.bash_profile; open ~/.bash_profile
sudo touch ~/.bash_profile; open ~/.bash_profile
All the time I get a message that I am not allowed to write to this file because it is protected.
My question is, how can I write to this file and start MySQL Server?
Thank you for your help.
Cheers
EDIT:
Output in terminal of command:
ls -l ~/.bash_profile
is
-rw-r--r-- 1 root staff 447 13 paź 17:33 /Users/macos/.bash_profile
EDIT2:
Could you write to me about how to find the path to the .bash_profile file? I think changing the privileges of this file will be the solution to the problem.
The solution was using vi/vim editor:
vi ~/.bash_profile
Then in vi/vim I pasted this line:
export PATH=${PATH}:/usr/local/mysql/bin
And saved it with this commands:
:wq!
So, whenever i run composer self-update or composer selfupdate I get the following error:
[ErrorException]
rename(/Users/jrobinson/.composer/cache/composer-temp.phar,/usr/local/bin/composer): Permission denied
I'm not too sure what's going on. I THINK i may had screwed up my .bash_profile file up. I wasn't having this issue prior to installing MySQL on my machine, and updating the first line in my .bash_profile.
I have looked at other articles, and I have tried reinstalling using the getcomposer.org commands on their download page. None of these solutions have fixed my problem. So please don't mark this as a repeat question as none of the solutions on SO have helped me solve this issue.
Here is my .bash_profile file contents.
export PATH="~/.composer/vendor/bin:$PATH:/usr/local/mysql/bin"
export EDITOR='sub -w'
Here is the ls -la command run in the /usr/local/bin folder.
Goal
Be able to run the composer self-update command and the mysql command from my terminal at the end of all this.
It looks like Composer is installed in /usr/local/bin, so you probably did that as root. To update it, you also need to be a root - try with sudo:
sudo -H composer self-update
I have installed mysql and I get the version of mysql from command prompt by
mysql --version.
But when I try to start / stop my server from command prompt by
mysql.server start
I get an error
-bash: mysql.server: command not found
Have edited my .bash_profile
export PATH=$PATH:/usr/local/mysql/bin/
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
Use this command: sudo /usr/local/mysql/bin/mysqld_safe&
Following the instructions in https://github.com/membase/manifest I obtain the error:
daemon/memcached.h:12:27: fatal error: cbsasl/cbsasl.h: No such file or directory
after:
$ repo init -u git://github.com/membase/manifest.git -m branch-2.1.0.xml
$ repo sync
$ make
Also in branch-2.0.1.xml
Thanks in advance!!!
Not compiling support for Ubuntu 13.10
i face with following error when i build roms model by ./build.bash command. appeared error is
cpp: error trying to exec 'cc1': execvp: No such file or directory
i use yum install gcc-c++ but it replied that package gcc-c++-4.6.3-2fc16.i686 already installed . but i get nothing after typing whereis cc1.then i find cc1 in /usr/libexec/gcc/i686-redhat-linux/4.6.3. therefore i navigate to /usr/bin and create link by ln -s cc cc1. after that by typing whereis cc1 it replied:/usr/bin/cc1
again by typing ./build.bash it reply:
cc1:error:unrecognized command line option '-quiet'
would you please tell me how i can sort out this problem.
cheers
fereshte