I hade CompileDaemon working in my golang app before, but it stopped working on my WSL Ubuntu. I tried everything to get it working, and then reinstalled WSL switching to Debian. I am not using docker. I then tried things again and it still says command not found even after installing it two different ways:
go get github.com/githubnemo/CompileDaemon
go: added github.com/fatih/color v1.9.0
go: added github.com/fsnotify/fsnotify v1.4.9
go: added github.com/githubnemo/CompileDaemon v1.4.0
go: added github.com/mattn/go-colorable v0.1.4
go: added github.com/mattn/go-isatty v0.0.11
go: added github.com/radovskyb/watcher v1.0.7
go: added golang.org/x/sys v0.0.0-20191026070338-33540a1f6037
OR
go install -mod=mod github.com/githubnemo/CompileDaemon
Then when I run CompileDaemon --command="./folder_name"
returns:
bash: CompileDaemon: command not found
I face the same issue, here is how I solve it.
It seems that GOPATH is not added to ENVIRONMENT VARIABLE as expected.
vim ~/.zshrc
...
export GOPATH="/Users/YOUR_PROFILE_NAME/go" # set GOPATH
export PATH=$PATH:$GOPATH/bin. # append GOPATH to PATH
don't forget to
source ~/.zshrc
Related
I am trying to get mujoco_py running. When I do
import mujoco_py
I get this error:
Exception:
Missing path to your environment variable.
Current values LD_LIBRARY_PATH=
Please add following line to .bashrc:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/jonah/.mujoco/mjpro150/bin
I have added the above line to both /etc/skel/.bashrc and ~/.bashrc. If I run
echo $LD_LIBRARY_PATH
I get
/home/jonah/.mujoco/mjpro150/bin/
My .mujoco folder includes mjkey.txt and the mjpro150 folder. I can run ./simulate successfully, so I have a feeling that this is some kind of mujoco_py specific bug.
Which program do you use to import mujoco?
I had a similar issue using mujoco_py with PyCharm Community 2018.1. A workaround was to launch PyCharm from the terminal instead of using the launcher icon. Maybe it could help with your issue too.
Otherwise you could try adding the LD_LIBRARY_PATH to ~/.profile instead of ~/.bashrc, as proposed in this answer here: https://askubuntu.com/questions/1022836/python-not-recognizing-ld-library-path/1022913#1022913
You can try to reinstall Pycharm for the newest version.
After you save the .bashrc file your want execute this code.
source ~/.bashrc
Now link is updated.
Please check the user which you run the code with. The mismatch user will cause this problem. There is the checklist may help you:
Don’t use ‘sudo’ to run the code;
Don’t use ‘sudo’ or virtual environment (e.g., anaconda) to run Pycharm (If you run the code in Pycharm).
when trying the example of the moq framework, I get the following exception when I enter "go generate":
example.go:5: running "moq": exec: "moq": executable file not found in $PATH
What should I do? I'm using Kubuntu 16.04
PS: I tried
export PATH=$PATH:/home/[...]/go/src/github.com/matryer/moq
without success
#sprabhakaran got the right answer. I only needed to add the go binary folder to the PATH global variable:
export PATH=$PATH:/home/[...]/go/bin
and if it doesn't work, check that moq was correctly installed.
First, install using the following command:
go install github.com/matryer/moq#latest
Go binary should be added to the global PATH
export PATH=$PATH:$HOME/go/bin
worked for me on MAC
I am using linuxbrew to install node. That works well, unless, for the fact that I can only use node after I do the following path export.
export PATH="/home/ericel/.linuxbrew/bin:$PATH"
If I close that terminal and open a new terminal, I will still have to do the same PATh export in order to get my node working.
Is there anyway to fix this permanently?
I do brew doctor, I get the following instructions:
ericel#ericel-X401A:~$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: /usr/bin occurs before /home/ericel/.linuxbrew/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
xzmore
unlzma
lzcmp
brew
xzegrep
lzgrep
lzdiff
lzless
lzma
pkg-config
xzfgrep
xzdiff
xz
lzfgrep
lzcat
lzegrep
unxz
xzgrep
xzcat
xzless
lzmore
lzmainfo
xzcmp
Consider setting your PATH so that /home/ericel/.linuxbrew/bin
occurs before /usr/bin. Here is a one-liner:
echo 'export PATH="/home/ericel/.linuxbrew/bin:$PATH"' >> ~/.bash_profile
Warning: Homebrew's bin was not found in your PATH.
Consider setting the PATH for example like so
echo 'export PATH="/home/ericel/.linuxbrew/bin:$PATH"' >> ~/.bash_profile
Warning: You have a non-Homebrew 'pkg-config' in your PATH:
/usr/bin/pkg-config
`./configure` may have problems finding brew-installed packages using
this other pkg-config.
Warning: Homebrew's share was not found in your XDG_DATA_DIRS but you have
this variable set to include other locations.
Some programs like `vapigen` may not work correctly.
Consider setting the XDG_DATA_DIRS for example like so
echo 'export XDG_DATA_DIRS="/home/ericel/.linuxbrew/share:$XDG_DATA_DIRS"' >> ~/.bash_profile
But even after doing that, node will work just for that one terminal. I am using ubuntu 16.**
Just had the same error. I think it was, because I installed linuxbrew at first from official page instructions and then i used apt-get.
So I removed the apt-get installation
sudo apt remove linuxbrew-wrapper
and then just added the path to
nano ~/.bashrc
as written in official documentation
echo 'export PATH="$HOME/.linuxbrew/bin:$PATH"' >>~/.bash_profile
then you need to open new terminal for it to take effect.
I am facing a problem which i found some solutions but it is still not working.I installed nodejs for windows 32 bit version, and everything went well.Now when i installed browser-sync via command line running the command
$ npm install -g browser-sync
Now everything got installed correctly with a couple of warnings. Now when i ran the command
$ browser-sync --version
it said browser-sync command not found.So i googled and found out that my environment variable might not be set correctly so it is not picking up my command. So then i tried finding the correct path to be set in the env variable via the following command which gave the result
$ npm bin -g
C:\Users\TEMP\AppData\Roaming\npm;npm\npm
(not in PATH env variable)
So i tried adding the path via the command
$ PATH %PATH%;C:\Users\TEMP\AppData\Roaming\npm;npm\npm
But it is still not working.I checked whether the path is actually added directly from the environment editor and via running the command $ Path,and it is actually adding the path but the problem still persists.
I think the problem is with the folder name which has semicolon in it "npm;npm" which is actually used to separate paths.I am not quite sure why it is adding the folder with such a name, i tried renaming it but as soon as i run the command npm bin -g it makes a new folder with the same name.
Also i tried using the short name for the folder which was "NPM_NP~1" to avoid that semicolon issue but it is still not working.
I am stuck with this since past 2 days and hopefully i can find a solution from you guys so i can get on with some actual development work. I gave you guys as much info as i could. Let me know if you need something more and specific.
You need to have NODE_PATH set:
$ set NODE_PATH=%AppData%\npm\node_modules
I am trying to build the hello world app that comes with Cordova. I created the project and have added the following to my .bashrc:
export ANDROID_HOME=~/Android/Sdk
export PATH=${PATH}:~/Android/Sdk/tools:~/Android/Sdk/platform-tools
When I run echo $ANDROID_HOME, I see the correct path and running echo $PATH also returns the path with the correct sdk path appended. However, when I run sudo cordova build, it still says that $ANDROID_HOME is not set and android is not in your path. I have been trying to fix this for the last 3 hours with no solution :( Any help is appreciated! Thanks!
I seemed to have fixed my problem.
I am not 100% what it was, but it is likely that it had something to do with a combination of sudo and my JAVA_HOME variable not being set.
I was previously running sudo cordova build which was returning the error. I tried deleting and recreating the project after I read somewhere that it might be because of the sudo. After recreating the project, I ran it with just cordova build and I got a new error: Unable to run java -version. I figured that it was having some trouble locating my jdk installation and I had read somewhere that you needed to assign the JAVA_HOME variable in your .bashrc. So I added in export JAVA_HOME=/opt/java/jdk1.8.0_45 and then added $JAVA_HOME/bin to my path. After this, it built successfully.