I Installed drush8 via composer for drupal 8. I have updated .bashsrc file with export PATH="$HOME/.composer/vendor/bin:$PATH". But still when I try to execute drush command, terminal is showing "command not found"
Try this, If Drush already installed check using $which drush This will show you the current drush path something like ~/vendor/drush/drush
If you don't have drush installed you can add using
$ composer global require drush/drush
Add path to your .bashrc file.
PATH=$PATH:$HOME/bin:/home/currentusername/vendor/drush/drush
Export PATH
save you changes and exit the terminal and relogin to validate your drush works from anypath.
export PATH="$HOME/.config/composer/vendor/bin:$PATH"
source ~/.bashrc
Related
I have recently installed PIPX on MAC running Big Sur and ZSH shell. During the install it prompted for the following to be added to the .zshrc file....
# Created by `pipx` on 2021-03-20 14:22:23
export PATH="$PATH:/Users/xxxx/.local/bin"
eval "$(register-python-argcomplete pipx)"
Running echo $PATH showed /Users/xxxx/.local/bin added to the end of my PATH variable. However, when I close the terminal and open up a new session, running echo $PATH now shows the location duplicated at the end of the PATH :/Users/xxxx/.local/bin:/Users/xxxx/.local/bin
Opening and closing new terminal sessions doesn't seem to create any more additions to PATH it just remains at these 2 entries....
I have run typeset -U PATH path to remove the duplicate but each time I open up new terminal sessions it just duplicates again.
Does anybody know how I can stop this from happening.....I would really like to keep my PATH variable as clean as possible.
Add the following path to your .zshrc file :
export PATH="${PATH}:$(python3 -c 'import site; print(site.USER_BASE)')/bin"
Reference: [command not found: pipx]: https://github.com/pipxproject/pipx/issues/283
I'm new in flutter I want to set flutter sdk path in Mac OS (VS code) for this I'm fallow the https://flutter.dev/docs/get-started/install/macos#update-your-path but when I run $HOME/.zshrc in Terminal It show error message zsh: permission denied: /Users/macbookpro/.zshrc I also apply this Terminal error: zsh: permission denied: ./startup.sh but this is not work for me.. can some one help me
step.1
Open your terminal.
step.2
cd ~
vim .zshrc
step.3
Pass i to insert,and insert your flutter path(/bin:/Library/flutter/bin) behind .bin:$PATH/.
If you are done, press esc and enter :wq.
example
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH/bin:/Library/flutter/bin"
If you want to evaluate its content inside your current zsh process, you can do a
source ~/.zshrc
You need to set the execute permission on the file, as you do for any other command which you want to execute, i.e.
chmod +x ~/.zshrc
For saving time, a little bit edited answer.
Commands in the terminal
cd ~
nano .zshrc
In the editor add path to the folder, for example
path+=('/usr/local/bin/ntfy')
Save, exit. Apply changes to current terminal
source ~/.zshrc
PS Check that in the file presents a line with export.
I am new to Linux Subsystem. I am trying to use a package in miniconda. Now after installing miniconda in order for it to work you need add the path like this:
export PATH=~/miniconda/bin:$PATH
I do this and the conda works. I exit the terminal and when I come back and look at my $PATH (using echo $PATH) I see is reset and I have to do it again. What should do for it to stick?
Set and export the PATH variable in your .bashrc file
vi ~/.bashrc
I just setup a Rails Application in my Ubuntu 18 machine, and I want to connect it to Forest Admin. However, Forest Admin requires that I set up a Node Application using npm first. The node application requires the installation of Lumber CLI tool in order to install Forest Admin.
I have however installed Lumber CLI tool by running the command below:
npm install -g lumber-cli#latest -s
When I run the command below npm lumber -version in my command line terminal, I get the response:
6.13.4
But when I try to generate the Forest Admin using the command below:
lumber generate "my_project"...
I get the following error:
Command 'lumber' not found
I need some help. Thank you.
Here's how I solved it:
The issue is because NPM does not have the write access to the directory that will contain the package you want to install (here lumber-cli).
To solve this issue, override the default directory where your global NPM packages will be stored:
mkdir ~/.npm-global
Then, configure NPM to use this directory instead of the default one:
npm config set prefix '~/.npm-global'
Then, make the node executables accessible from your PATH. To do so, export the environment variable PATH by opening or creating the file ~/.profile and add this line at the end:
export PATH=~/.npm-global/bin:$PATH
Finally, reload the ~/.profile file:
source ~/.profile
Try installing lumber cli again using the command below:
npm install -g lumber-cli#latest -s
It should be able to install lumber without any error, and also display the directory where lumber-cli is installed.
Reference: Prevent permission errors at installation
That's all
I hope this helps
when i try to run git-all-secrets i got Dockerfile: command not found
and this is the command include correct information
here is an example of the issue
root#momo22:/home/momo/git-all-secrets# docker run -it abhartiya/tools_gitallsecrets -token=9a8b60a10cf683f238e05 -org=bugcrwod
Command 'docker' is available in '/snap/bin/docker'
The command could not be located because '/snap/bin' is not included in the PATH environment variable.
docker: command not found
root#momo22:/home/momo/git-all-secrets#
Temporary solution:
Run the command export PATH=$PATH:/snap/bin
Permanent solution:
Edit /etc/environment and add /snap/bin in the list then restart your system.
Links
answer for similar error with same fix
More info on /etc/enviroment
you can add the path into .bashrc file
$ echo 'export PATH=$PATH:/snap/bin' >> ~/.bashrc
open new terminal or execute this command
$ source ~/.bashrc
To fix this issue do the following:
Open the file /etc/environment.
Add /snap/bin to the end of the PATH Variable and concatenate using the : character.
Example lets assume we had the PATH variable in the file was: Path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
After your update this will look like: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin
Finally to update your shell and have the PATH variable ready to use, run source /etc/environment
Done
If you come here and are just on Ubuntu rather than docker and you have just installed snapd without logging out/in again, log out then in again - you don't need to modify any files.
Open the ~/.bashrc with nano or vim => vim ~/.bashrc
add export PATH=$PATH:/snap/bin at the end of the file
log out from your user and log in again or reboot
if ~/.bashrc doesn't exist:
create ~/.bashrc file and open it => touch ~/.bashrc && vim ~/.bashrc
add PATH=$PATH:/snap/bin
logout from your user and login again or reboot
if you don't want to logout or reboot run these commands:
sudo su ${USER}
bash
open ~/.bash_profile
add export PATH=$PATH:/snap/bin and save the changes
run source ~/.bash_profile
you can open ~/.bash_profile with vi or gedit