k8s oidc issues with helper package (k8s-oidc-helper: command not found) - go

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

Related

Why /user/local/go isn't recognized as a Go SDK in GoLand

I'm trying to setup GoLand to use WSL 2 as in this guide: https://www.jetbrains.com/help/go/how-to-use-wsl-development-environment-in-product.html
I've installed Go in the Ubuntu distro following the linux instructions on the GoLang website, and go version prints outs the version I downloaded, so it appears that Go is working inside WSL.
So now I tried to create a new project in GoLand, and I'm getting errors, which appear to come from the fact that the SDK isn't loaded in GoLand. The guide doesn't offer much guidance on this, so I just tried to add a local SDK.
When I select /usr/local/go I get an error that it's not a valid SDK.
So I created the ~/go directory, and then updated my .zshrc file to export the GOPATH and GOROOT environment variables, even though they already showed up when I ran go env, doing this got them to show up on a simple env call.
But I'm still getting the invalid SDK error like above.
Is there a configuration step I'm missing that isn't spelled out in the guide? I came across this old post about creating symlinks to fake the expected directory structure. I haven't done this because it's a really old post, has comments that say this has been fixed, and seems like a really odd solution.
Support for Go SDK in WSL2 will be available in the next 2021.3 release, please see GO-10618.
October 2021 update.
2021.3 reaches Early Access Program at the moment. GoLand suggests selecting Go SDK on WSL2 mount if the location of the project is on WSL2 as well.
I experienced this on my Debian machine and I wasn't using WSL2. I found that the actual cause of the issue is that Goland is unable to read the directory /usr/local/go/bin due to inadequate permission.
A possible solution is to run the goland.sh script as root. The script can be found in the bin/goland.sh directory of the Goland IDE folder. Here is a simple command to do run Goland as the root
export HISTIGNORE='*sudo -S*' && echo "sudo-password-here" | sudo -S /absolute-path-to-goland.sh
export HISTIGNORE='*sudo -S*' tells bash history to ignore caching any command matching sudo -S* to bash history. This way, your sudo-password isn't saved into the bash-history file.
echo "sudo-password-here" | pipes your sudo password as input to the next command.
sudo -S tells bash to read input for password prompt from stdin, which has been provided through the echo command.
Alternatively, you can just install the latest version of Goland. Hopefully, it doesn't come with this bug

docker commands not found

I installed docker in Mac and it is installed successfully.
Also it is running.
And tried to execute the below command in terminal
docker -v
See the below error:
-bash: docker: command not found
How do I solve this issue.
In windows those commands are working fine.
If you successfully installed docker using the official package, the command should be available under /usr/local/bin/docker.
That directory might not yet be in your $PATH, so you could try adding export PATH="/usr/local/bin:$PATH" to your .bashrc / .bash_profile.

Difficulty getting error when running flutter doctor

It ran smoothly in the beginning, but after a while I get this :
Downloading windows-x64 tools...
Download failed.
URL:
https://storage.googleapis.com/flutter_infra/flutter/1c26bf8c4b55f4fa5f0d175768a1a0cc115c70b2/windows-x64/artifacts.zip
Error: 403 Forbidden"
I have tried to change flutter directory, but it didn't help.
If you are behind a proxy or firewall follow the instructions in these documents
https://flutter.io/community/china
https://www.dartlang.org/tools/pub/troubleshoot#pub-get-fails-from-behind-a-corporate-firewall
export https_proxy=hostname:port
https://github.com/flutter/flutter/wiki/Workarounds-for-common-issues#hot-reload-not-working
export NO_PROXY=127.0.0.1,localhost
I had Same issue and i resolve that with do following tips.
if you are Forced to use proxy for any reason, you need to set proxy true.
to do that, at first run this in terminal:
On Linux/macOS:
export https_proxy=hostname:port
On Windows Command Prompt:
set https_proxy=hostname:port
On Windows PowerShell
$Env:https_proxy="hostname:port"
I am using linux ,
in terminal i ran
export https_proxy=10.32.0.1:8080
// It is my proxy:port
and then ran
flutter run

Tried to install golang command but it shows command is not found

I have set my $GOPATH=$HOME/go and $GOROOT=usr/local/go
I tried to follow this tutorial so that I could do hot reload on my golang webserver
https://github.com/codegangsta/gin
I installed it via
go get github.com/codegangsta/gin
then I tried to run
gin -h
It shows command is not found
I have checked that the library is installed in my $GOPATH/bin
What should I do?
you need to add these commands to your shell startup (.bashrc or similar) or do them manually before using gin
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH

Installing Glassfish, Wildfly using homebrew on Mac OSX

Trying to install Glassfish(Java EE App. Server) and Wildfly App Server using Homebrew .
http://macappstore.org/wildfly-as/
http://macappstore.org/glassfish/
used these above mentioned tutorials .
I got the following errors while trying to run them by typing just "glassfish" & "wildfly-as" respectively.
Output(Error):
-bash: glassfish: command not found
-bash: wildfly-as: command not found
Searched about it and I think it has something to do with $PATH. I don't understand $PATH Variable . Need help.
The issue is that there are two asadmin scripts. One at $GLASSFISH_HOME/bin and one at $GLASSFISH_HOME/glassfish/bin
Here are full instructions to get your domain up
brew update
brew install glassfish
you should see message, add that line to your .bash_profile
==> Caveats
You may want to add the following to your .bash_profile:
export GLASSFISH_HOME=/usr/local/opt/glassfish/libexec
Open a new terminal then, cd $GLASSFISH_HOME/glassfish/bin
./asadmin start-domain --verbose
Browse to http://localhost:8080 for welcome page and http://localhost:4848 for admin console
I actually installed Wildfly-Application Server using homebrew but could not find a way to run it.
https://tomylab.wordpress.com/2016/07/03/how-to-install-wildfly-on-mac/
This tutorial helped me .
And for glassfish, my installation was again successful using homebrew but was not able to run it . I did figure it out when I ran the following commands.
$ cd /usr/local/opt/glassfish/libexec/bin
$ ./asadmin
asadmin> start-domain
You need to understand about the PATH variable. It is an environment variable on Unix-like operating systems, specifying a set of directories in which executable programs are located. In general, each executing process, or user session, has its own PATH setting.
So, you need to add the glassfish home path to your actual path variable.
Now, as per your problem with running the Glassfish server; try this:
export GLASSFISH_HOME=/usr/local/opt/glassfish/libexec/
export PATH=$PATH:$GLASSFISH_HOME/bin
Add it to your bash profile, if you do not want to do this everytime.

Resources