In the yarn installation doc it is mentioned as below:
Add this to your profile: export PATH="$PATH:/opt/yarn-[version]/bin"
But it is not working for me.
Can anyone explain how to achieve this?
Try with:
export PATH=$PATH:$HOME/.yarn/bin
Still, this won't be permanent, each reboot will start with the past $PATH.
Related
I installed miniconda on our CentOS cluster and it all went fine. Then I asked miniconda to create a python 3.8 environment, and it went fine. However, when I try to activate the environment, I get the following error:
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
I verified, and it's a bash environment. So I ran conda init bash and I got the following outputs:
no change /MyPath/miniconda3/condabin/conda
no change /MyPath/miniconda3/bin/conda
no change /MyPath/miniconda3/bin/conda-env
no change /MyPath/miniconda3/bin/activate
no change /MyPath/miniconda3/bin/deactivate
no change /MyPath/miniconda3/etc/profile.d/conda.sh
no change /MyPath/miniconda3/etc/fish/conf.d/conda.fish
no change /MyPath/miniconda3/shell/condabin/Conda.psm1
no change /MyPath/miniconda3/shell/condabin/conda-hook.ps1
no change /MyPath/miniconda3/lib/python3.9/site-packages/xontrib/conda.xsh
no change /MyPath/miniconda3/etc/profile.d/conda.csh
no change /home/users/me/.bashrc
No action taken.
So nothing happens. And when I try to activate the new environment, then I still get the first error.
Any idea how I can fix this?
[Solution] Thanks to the answer below, the issue was that despite testing that I was running/using a bash, I still have to run "bash" in the command line before activating model.
have you tried manually adding to ~/.bashrc?
add export PATH="/home/username/miniconda/bin:$PATH" in your bashrc file. make sure to replace /home/username/miniconda with your actual path now save the file, quit and reopen the terminal should work I guess.
I'm running Linux and have set proxy env vars under /etc/environment which I guess Yarn uses to connect to the npm repository. For some reason, the proxy dies these days and Yarn keeps trying to connect to the proxy without giving me any chance of telling it what to do. I have set export http_proxy="" and export https_proxy="" with no luck. How do I tell Yarn to hey go direct.
Edit: Surprisingly Yarn doesn't respect to anything I set.
passing --proxy "" --https-proxy "" doesn't work.
setting another proxy env doesn't work.
It seems Yarn has a severe problem in respecting user configuration. Installing npm right now.
Anyway, shouldn't it at least prompt me what I should do?
In this case I would use the unset Unix command to clear those proxy variables
unset http_proxy; unset https_proxy
What I have done, because yarn also doesn't respect the no_proxy variable, and I need that part of it, is to essentially create a wrapper shell script over yarn that I use.
~/bin/my_yarn.sh
unset http_proxy; unset https_proxy; yarn $1
Then do ~/bin/my_yarn.sh install to install, or whatever.
I am facing issues with k8s-oidc-helper package installed with go. However when i run any of the commands with it it gives command not found error. I am running this on ubuntu 16.04 VM. How can i resolve this?
I have resolved this issue. The path set was incorrect for `go'
I checked the environment of go and accordingly set the path.
export GOPATH=/usr/lib/go
export PATH=$PATH:$GOPATH/bin
sudo go get -u github.com/micahhausler/k8s-oidc-helper
now the helper package works
I have installed java 1.7 on my mac, and I have edited ~/.bash_profile as the following:
export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Content s/Home
export PATH=${JAVA_HOME}/bin:$PATH
When I execute source /.bash_profile, the java become available. But when I restart the shell, I got the following error message:
No Java runtime present, requesting install.
I have to re-execute source /.bash_profile to make it available.
I am so confused, hope someone can help me.
It is because variables you export are only valid in the current ssh session.
Look here for deeper explanation:
Mac OS X 10.9 - setting permanent environment variables
As #trojanfoe stated there:
The .bash_profile is only executed for a login-shell, whereas .bashrc
is executed for every new shell instance
Check this posting out please. I don't believe your problem is a JAVA problem but it looks rather misunderstanding on BASH side.
I am trying to get to install stardog on mac 10.8.5 using the instructions provided at http://docs.stardog.com/quick-start/.
The export path particular directory has been created and for which echo’ed to make sure that environmental variable is set up. The license key that is provided is also in the correct directory. When I try to run “$ ./stardog-admin server start” the command is not recognized. So I tried to create an export PATH to stardog’s bin, which did not work either.
I have also tried manually adding the path in the following:
- ~/.bash_profile
- ~/.profile
Still no luck, any ideas?
Using zsh I had a similar problem. For some reason, the docs suggest that from the stardog-directory-name directory you can run the command, but it didn't work until you cd into the bin directory. Once there ./stardog-admin server start should run correctly.
It sounds like you simply have something incorrect in your .bash_profile or .profile. If you run either of the stardog scripts from it's bin directory, it will work. If you're getting a command not recognized error, that sounds like bash cannot find the stardog-admin script.