bazelisk icon indicating copy to clipboard operation
bazelisk copied to clipboard

could not download Bazel: could not create directory

Open lunasdejavu opened this issue 5 years ago • 2 comments

I use go to install bazelisk to install tensorflow go get github.com/bazelbuild/bazelisk the configue file in tensorflow said:

You have bazel 0.28.0 installed.
Please upgrade your bazel installation to version 3.1.0 or higher to build TensorFlow!

then I type bazelisk it shows: 2020/11/09 18:13:22 could not download Bazel: could not create directory /home/dynacolor/.cache/bazelisk/downloads/bazelbuild/bazel-3.1.0-linux-x86_64/bin: mkdir /home/dynacolor/.cache/bazelisk/downloads/bazelbuild/bazel-3.1.0-linux-x86_64: permission denied then I type sudo bazeklisk sudo: bazelisk: command not found what can I do now?

lunasdejavu avatar Nov 09 '20 11:11 lunasdejavu

It is not about sudo permission. Try chmod +x /home/dynacolor/.cache/bazelisk/downloads/bazelbuild/bazel-3.1.0-linux-x86_64 and run it again. I think it is because you need to set executable permission of it.

I can't since it hasn't been created yet

lunasdejavu avatar Nov 10 '20 00:11 lunasdejavu

Sorry I was not reading carefully. What I was trying to say was
chmod +x bazelisk in the directory that you built bazelisk to make sure it has permission to execute. If the above does not work, you might use sudo -s bazelisk to work around.

serach24 avatar Nov 10 '20 03:11 serach24

Closing due to age. Please re-open if the problem still persists.

fweikert avatar Feb 06 '24 17:02 fweikert