Where to set GOPATH after installing go using brew? - oauth

I installed Go on my ubuntu 14.04 using Linux brew and then I have set GOPATH to $HOME/go. But after that i tried to install goauth package for go using go get command but still my code is not importing goauth package. After going through the error I decided to check the GOPATH. It is properly set but the goauth package is not getting installed in $HOME/go/src/code.google.com/p. Please suggest me a work around. Here is the error that I am getting.
dummy.go:5:8: cannot find package "code.google.com/p/goauth2/oauth" in any of:
/home/avinash/.linuxbrew/Cellar/go/1.4.2/libexec/src/code.google.com/p/goauth2/oauth (from $GOROOT)
/home/avinash/go/src/code.google.com/p/goauth2/oauth (from $GOPATH)
go/src/github.com/google/go-github/github/github.go:22:2: cannot find package "github.com/google/go-querystring/query" in any of:
/home/avinash/.linuxbrew/Cellar/go/1.4.2/libexec/src/github.com/google/go-querystring/query (from $GOROOT)
/home/avinash/go/src/github.com/google/go-querystring/query (from $GOPATH)

Related

Appium) Finishing setting up optional dependencies

First of all, below is required information.
OS: macOS Mojave 10.14.2
Node: 10.13.0
AndroidStudio: 3.1.4
When I run appium doctor, I'am getting two optional dependencies are missing.
1. `opencv4nodejs`
2. `bundletool.jar`
If I try to install opencv4nodejs, but I got warning:
opencv4nodejs#4.14.0 has no binaries
(It seems like auto build failed)
And I have no idea how to add export bundletool.jar as PATH.
I just ran into this myself. Installing opencv4nodejs was pretty easy - for that, I used:
npm -g install opencv4nodejs
There may have been dependencies of 'opencv4nodejs' that I had to install - I can't remember; that may have required me to install 'make' with brew install make
The hard one was the bundletool.jar - here are the steps I followed for that:
Searched for 'bundletool.jar' and found a place to download it from Google - I got 'bundletool-all-0.8.0.jar' from https://github.com/google/bundletool/releases
I renamed this file to just 'bundletool.jar' and placed in my Android SDK folder, under its own sub-folder called 'bundle-tool' - full path: /Users/{USER}/Library/Developer/Android/sdk/bundle-tool
I had to make the bundletool.jar executable with:
chmod +x bundletool.jar
Added the 'bundle-tool' folder to Path with the following addition in my ~/.bashrc file:
PATH="$PATH:$ANDROID_HOME/bundle-tool"
Now running which 'bundletool.jar' is happy and finds it in the 'bundle-tool' folder I created (see step 2)
Running 'appium-doctor' is now satisfied - and doesn't report any missing dependencies.
Hope that helps.
2019-10-31 update:
With MacOS Catalina (specifically 10.15.1) - I ran into a problem with installing opencv4nodejs using the npm command shown above. Opencv4nodejs wants to be built - but using C++ 11 features (from what I read) and has a problem with constexpr on MacOS. So, I first installed OpenCV with Brew - using brew install opencv#4 and then had to set the environment variable to not autobuild OpenCV with export OPENCV4NODEJS_DISABLE_AUTOBUILD=1
Then I was able to install opencv4nodejs with the npm command shown above - and appium-doctor shows that its dependencies are in place.

Docker LVM plugin install issues

im trying to install docker lvm plugin given in this link and when I execute the make command it throws me the following error.
pr#pr-ubuntu:~/ba/docker-lvm-plugin$ make
go-md2man -in man/docker-lvm-plugin.8.md -out docker-lvm-plugin.8
/usr/bin/go build -o docker-lvm-plugin .
utils.go:14:2: cannot find package "github.com/docker/docker/pkg/system" in any of:
/usr/local/go/src/github.com/docker/docker/pkg/system (from $GOROOT)
/home/pr/programming/go/packages/src/github.com/docker/docker/pkg/system (from $GOPATH)
driver.go:10:2: cannot find package "github.com/docker/go-plugins-helpers/volume" in any of:
/usr/local/go/src/github.com/docker/go-plugins-helpers/volume (from $GOROOT)
/home/pr/programming/go/packages/src/github.com/docker/go-plugins-helpers/volume (from $GOPATH)
make: *** [lvm-plugin-build] Error 1
I believe its looking for docker go-plugin-helpers, I see those packages here but not sure how to install in my GOPATH.
https://github.com/docker/go-plugins-helpers
If you're trying to build a Go program, you should read the Go documentation, at least the basics. To install a package:
go get github.com/docker/go-plugins-helpers

'pkg-config' is not recognized as an internal or external command when installing package

So I'm getting this error when attempting to install OpenCV on my computer.
'pkg-config' is not recognized as an internal or external command
I've been searching around for this pkg-config package and I can't seem to find a proper download source anywhere.
The only one I did find was pkg-config-lite. I tired to see if that one would work but no luck.
The original pkg-config release is available here:
http://www.freedesktop.org/wiki/Software/pkg-config

pod2man not found while installing Wireshark

I was trying to install WireShark 1.10.5 in linux.I was following the instructions provided with the software. Now,I am having problems while installing. It says pod2man cannot be found. How can i fix this?
checking for pod2man... no
configure: error: I couldn't find pod2man; make sure it's installed and in your path
try
apt-get install perl-modules
According to FOSSology bug 5619:
the pod2man utility which is used by the build process has been moved to a different package in Fedora 19 called perl-podlators
In previous versions it was in the package perl
so it appears you need to install the package "perl-podlators" to get pod2man.

Homebrew - repeated "linking" bug. What is the underlying issue here?

So I've been using homebrew to install various packages/libraries/programs on my mac. I keep running into a problem in which homebrew tells me that I have unlinked kegs in my Cellar.
For instance, upon running brew install phantomjs I received the following message:
Warning: Could not link phantomjs. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link phantomjs'
Possible conflicting files are:
/usr/local/bin/phantomjs -> /usr/local/lib/node_modules/phantomjs/bin/phantomjs
I tried running brew link phantomjs as recommended, and hit a similar problem:
Error: Could not symlink file: /usr/local/Cellar/phantomjs/1.9.2/bin/phantomjs
Target /usr/local/bin/phantomjs already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name
The command brew link --overwrite --dry-run phantomjs gives the following message:
Would remove:
/usr/local/bin/phantomjs -> /usr/local/lib/node_modules/phantomjs/bin/phantomjs
I will probably go ahead and overwrite, but this appears to happen every time I try to install something with homebrew. Why? Why isn't homebrew working as expected?
Thanks.
From what I can tell, looks like you have previously done:
% sudo npm install -g phantomjs
In this case, you should do the following:
% sudo npm uninstall -g phantomjs
% brew link --overwrite phantomjs
I thought I'd take a crack at this. I ran into a similar problem today, and I think it may be related to this:
https://github.com/Homebrew/homebrew/issues/22408
Long story short, I think it has to do with how npm manages packages vs how brew does it. (I'm assuming you installed node with its defaults, which would have given you npm).
At some point you probably installed some package with npm. Maybe grunt, karma, etc..those by default end up in /usr/local/lib/node_modules.
Maybe one of those packages or its dependencies(or sub-dependencies) depended on phantomjs (I think Karma might use phantomjs?) Anyways, if now you are trying to brew install phantomjs, which is trying to make a symlink to it, that may be conflicting with the already existing symlink that npm created for you..
I think you can change the symlink path for that package so that brew permanently points to that already installed package in the node_modules folder. Sorry not to be more specific, I'm just figuring this out myself.

Resources