I attempted to check the version of my go executable with go version on an Ubuntu machine, however I got the following error:
No version set for command go
Consider adding one of the following versions in your config file at
golang 1.16.8
golang 1.17.1
How do I resolve this? I have no prior experience with config file, I searched on google but I found nothing which could solve this issue.
That seems to be an error message from asdf-vm/asdf, a tool which manages multiple runtime versions with a single CLI tool, extendable via plugins.
You can see that error message in asdf-vm/asdf issue 838.
The config file should be in $HOME/.tool-versions
To resolve this, as in this example:
asdf plugin add go
asdf install go latest
Related
I'm trying to get protocol buffer working with intelliJ and gradle. However, I'm running into this error:
Execution failed for task ':generateProto'.
protoc: stdout: . stderr: protoc: error while loading shared libraries: libprotoc.so.9: cannot open shared object file: No such file or directory
I've seen this post: Protobuf cannot find shared libraries that explains the situation. But my question is that everything runs perfect on terminal as shown below:
yuefengzhao#zyf-ubuntu:~$ which protoc /usr/local/bin/protoc
yuefengzhao#zyf-ubuntu:~$ protoc --version libprotoc 2.6.1
But it's just not working at all on intelliJ. I'm not sure if intelliJ is configured so that protoc is pointing to eleswhere rather than what's set up in terminal.
scrrenshot of build.gradle and error message
Also, it's one of the requirements that I have to use protobuf v2.6.1
I've spent many hours trying and failing, looking for tons of solutions online but still couldn't wrap my head around.
Any help would be appreciated!
After debugging all night, I figured it's path to protoc that causing the problem. In my system terminal, protoc points to /usr/local/bin as expected when I do which protoc. But IntelliJ somehow gets a different path, pointing to /yuefeng/bin which is under /home.
The solutions is to start IntelliJ from system terminal instead of GUI (I'm using ToolBox) - a suggestion from IntelliJ support team.
I guess this is just a glitch from IntelliJ.
I need a pre build project and I need a version of protoc-gen-go v1.25.0-devel but I am unable to find command etc to install It , till now I tried to do something like this :
go get -u google.golang.org/protobuf/cmd/protoc-gen-go#v1.25.0-devel
and I am getting this ERROR invalid version: unknown revision cmd/protoc-gen-go/v1.25.0-devel
Is there any way to get this version ?
If you're following this post to create a sample service, you don't need the specific version 1.25.0-devel that appears in the generated files. You should use the latest stable version (currently v1.26.0). Since it is an minor version upgrade, there should be no breaking changes between versions. One thing that you may need to make the examples in the post to work is that you should set the package for the generated code. You can set it in the .proto file as an option, for example option go_package = grpc-example/generated/protos/calc or as a command line argument for the protoc command, for example protoc ...OTHER_OPTS --go_opt=Mprotos/calc.proto=grpc-example/generated/protos/calc.
If you are sure that you absolutely need the specific version v1.25.0-devel you can install the plugin pointing to a specific commit (as that version is not currently available as a tag/branch name). If you're using go 1.16.x you can use go install google.golang.org/grpc/cmd/protoc-gen-go-grpc#a9513eb pointing at this commit. For older go versions, use go get
First thing I do after unpacking the SnowSQL Linux client is try to upgrade it. This has worked very well through at least v1.1.84. Today I downloaded v1.2.2, installed it, and got an error:
$ ~/bin/snowsql -Uv
No snowsql is available for download: url=https://sfc-repo.snowflakecomputing.com/snowsql, version=1.2
The error comes from this download. Has something changed? I get the same error even when I just try to use it with no options at all, or trying to connect by passing my account code and username.
The curl above was missing https and hence gave the wrong impression of 403 forbidden.
Some times due to a caching issue with the downloads it will not autoupgrade. There are two main components, one being bootstrap and the other one being the main snowsql component. The one you see the issue with is the main component (it is auto-downloaded when you run snowsql).
You can force new version download using snowsql -v 1.2.2 as an exmaple.
You can delete/move the .snowsql directory (~/.snowsql or ~/bin/.snowsql) to ensure a new main component version is downloaded by the new bootstrap.
You may also try using the newer versions for which the rpm is available at
https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/index.html
I noticed Snowflake has some weird firewall configs and similar errors can either happen consistently or intermittently.
The only option I'm aware of that can help if it happens consistently is to use --noup flag with your commands. This will not check for snowsql updates of course, but you can always manually download a newer version via your browser(with VPN is needed).
Question: What are the steps to install a kubectl plugin on Windows?
I have written a plugin standalone binary that I would like to invoke from within kubectl (following the instructions in https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/)
The documentation for installation states to perform the following steps:
"A plugin is nothing more than a standalone executable file, whose name begins with kubectl-. To install a plugin, simply move this executable file to anywhere on your PATH."
This works fine on Mac and Linux, but performing those instructions on Windows does not seem to work. Running "kubectl plugin list" does not list my plugin and I cannot invoke it from within kubectl. I even tried adding my binary to the .kube directory autogenerated by kubectl, and it does not detect the plugin.
Several discussions on github reference this issue, without providing a response of how to install a kubectl plugin on Windows (ex: https://github.com/kubernetes/kubernetes/issues/73289). And after performing a lengthy google/stackoverflow search, there don't seem to be any tutorials/solutions that I (or my teammates) could locate. Any help would be much appreciated! Thank you.
In my case I don't have an issue with installing a plugin on Windows 10 machine (by simply including it on my PATH). Here is the output of 'kubectl plugin list':
c:\opt\bin>kubectl plugin list
The following kubectl-compatible plugins are available:
c:\opt\bin\kubectl-getbuildver.bat
- warning: c:\opt\bin\kubectl-getbuildver.bat identified as a kubectl plugin, but it is not executable
c:\opt\bin\kubectl-hello.exe
c:\opt\bin\kubectl-helloworld.p6
- warning: c:\opt\bin\kubectl-helloworld.p6 identified as a kubectl plugin, but it is not executable
error: 2 plugin warnings were found
Instead I'm encountering a known github issue: 'not supported by windows' error, while invoking my plugin with kubectl (v1.13.4).
c:\opt\bin>kubectl hello
not supported by windows
c:\opt\bin>kubectl-hello.exe
Tuesday
*kubectl-hello.exe - is console application written in csharp. I tried also to use Windows batch file and Perl6 program as plugins, but none of these worked out on Windows.
I think only .exe file extensions are considered as executables by kubectl when it searches for plugins in the $PATH when running in Windows environment.
I tested by creating a simple HelloWorld App as a single file executable, added it to my system's $PATH and it got picked up and executed correctly.
kubectl krew like brew to manage the kubectl plugin. You can try it. It supports Window.
https://github.com/kubernetes-sigs/krew
I have installed Go on my server using the golang repo for CentOS 6.4. The paths are set correctly and I can run go version. When I try to download the package below I receive this error. Any help is appreciated
go get github.com/fiorix/freegeoip
# github.com/fiorix/freegeoip
cannot create <nil>/go.o: No such file or directory
googling that error I came across a thread that suggests that this is a bug with detecting a missing TMPDIR environment variable, for compiling the source during go get.
run export TMPDIR=/tmp and it should work.
See here:
https://groups.google.com/forum/#!topic/golang-dev/LnxmgwB0r3Q