I am currently working on windows machine. Installed WSL to be able to work in Linux env.
Installed the Google Cloud SDK and am able to run gsutil and gcloud commands.
However, while trying to run bq, I get the bq command not found error.
Can someone help me here?
"bq" is one of the default Cloud SDK components, and gets installed by default.
Please check with the command "gcloud components list" to confirm if "bq" is available.
If not, maybe somehow your installation got corrupted. Please try re-installing to fix this issue.
Otherwise, try running these commands, see how the path for all are set and same like "/usr/bin" in the given example. This may reveal some path setting related issues which need to be fixed.
I've run into a similar issue when working on a Windows environment. I have found that calling bq.cmd helps to get the BigQuery commands to execute.
So running:
bq.cmd ls
instead of running:
bq ls
To list datasets in your current project.
In WSL2, install the Google Cloud CLI with this command as shown in the documentation.
curl https://sdk.cloud.google.com | bash
Then restart your WSL installation. The bq command works at both a Windows command prompt and a WSL terminal.
Related
This questions maybe already asked but that is not solve my issue.
I'm trying to deploy my gactions script in google cloud function. So for that I have installed the gactions CLI in Ubuntu 20.04 machine, but I'm having some problems.
The mentioned gactions CLI comments not working in terminal, it's shows [ERROR] unknown command "test" for "gactions" error message.
Eg: gactions test --action_package action.json --project PROJECT_ID
Am using gactions version 3.2.0. Please suggest me how to use those comments in terminal.
I have tried with sudo gactions test --action_package action.json --project PROJECT_ID that also not working.
As the error [ERROR] unknown command "test" for "gactions" describes that the test command is not validating by the gactions CLI.
Might be due to below reasons, can you you have a check on this :
As per this official doc , you are trying to execute the text command
but make sure the action package name given by you is correct.
Can you try any other arguments mentioned in the gactions supported
arguments doc and have a try whether those are validating or not.
Enable the Actions API in the Google Cloud console by following the
instructions in Enable and disable APIs. This allows gactions to
interact with your project.
Make sure you have installed the gactions CLI correctly by running
the command 'gactions version' to check the version number. If the
version number matches the version you installed, then the CLI is
probably installed correctly. If not reinstall the CLI using this
gactions overview
I want to install gcloud ssh component on Windows 10 Home in order to ssh GCE instances. But it failed showing the following message.
Your current Cloud SDK version is: 347.0.0
Installing components from version: 347.0.0
These components will be installed.
Name: gcloud Beta Commands
Version: 2019.05.17
Size: < 1 MiB
For the latest full release notes, please visit:
https://cloud.google.com/sdk/release_notes
Do you want to continue (Y/n)? y
Creating update staging area
10%
(snip)
100%
100%
ERROR: gcloud crashed (Error): [('C:\\Users\\tafut\\gcloud\\google-cloud-sdk\\platform\\gsutil\\third_party\\funcsigs\\docs\\index.rst', 'C:\\Users\\tafut\\gcloud\\google-cloud-sdk.staging\\platform\\gsutil\\third_party\\funcsigs\\docs\\index.rst', 'symbolic link privilege not held'), ('C:\\Users\\tafut\\gcloud\\google-cloud-sdk\\platform\\gsutil\\third_party\\mock\\docs\\changelog.txt', 'C:\\Users\\tafut\\gcloud\\google-cloud-sdk.staging\\platform\\gsutil\\third_party\\mock\\docs\\changelog.txt', 'symbolic link privilege not held')]
If you would like to report this issue, please run the following command:
gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics
Here is the gcloud version installed.
$ gcloud version
Google Cloud SDK 347.0.0
bq 2.0.69
core 2021.06.25
gsutil 4.64
i suggest you once uninstall cloud sdk and reinstall it again,sometimes most of the errors will get resolved through reinstalling .refer this documentation to uninstall.you can refer this documentation for installing it. and use any of this methods to ssh
I was using gcloud command from the "Git bash" in Windows. Even though I opened the "Git bash" with "Run as Administrator", gcloud would crash.
Instead, I opened Google Cloud SDK Shell (I still used "Run as Administrator"), and the gcloud commands worked without crashing.
I'm trying to automate deploying code to my 3 GCE Linux VM's. I read this article Scripting with gcloud: a beginner’s guide to automating GCP tasks, it shows how to make a script. Now I assume that means saving the code as a .sh file (it even has a shebang on top), now how do I run that. Do I type the script file name in the Google Cloud SDK Shell? I tried it, it does not seem to work. can someone help me? I will really appreciate.
Here is an image of my google cloud shell where I am trying to use the script files.
You're able to install Google Cloud SDK on variety of operation systems such as Linux, macOS and Windows. After that, you'll be able to use same commands like gcloud, gsutil and bq. Meanwhile, scripting relies on the command-line interpreters: you can use bash with Linux and macOS, but for Windows you should use cmd and PowerShell. You can run examples provided at the article, you've mentioned, and at the documentation Scripting gcloud CLI commands with bash on Linux and macOS, so the error messages you've got were expected. You can't run .sh scripts on windows naively, as it was mentioned by #Pievis at the comment section.
As a possible workaround you can install Windows Subsystem for Linux (WSL) for Windows 10 (usually you can choose between WSL2 and WSL1, but it depends on build version of your Windows 10) to get some interoperability between Windows and Linux.
If you need to transfer files to you VM instances please follow the documentation Transferring files to VMs.
If you are interested in automation with GCP, please have a look on the documentation Infrastructure as code to "automate repeatable tasks like provisioning, configuration, and deployments".
This is now the third or fourth time that this has happened in the last couple of weeks: When I launch Postman all I get is a blank screen:
The only way to get around this that I have found is to reboot my workstation, which is of course a PITA.
I am using Ubuntu 18.04.4 LTS, 7.20.0.
Any fixes, workarounds etc are welcomed.
I had same problem on my linux machine. Simply run the following on your terminal until they both tell you no more process to kill.
killall Postman
killall _Postman
I started facing this issue on updating to version - v8.2.3,
Try below approach, which worked for me..
Step 1: Add windows environment variable: POSTMAN_DISABLE_GPU, with the value: true
Step 2: From the same blank screen open a New Postman Window (File -> New Postman Window)
None of these worked for me, I had to go to "System Monitor" and kill a load of processes with names like "postman --no-sandbox", "postman --type=zygote".
Expanding on the previous answer, I put a script together that performs the loop as many times as needed to get Postman working again:
#!/bin/bash
OUTPUT=$(killall Postman 2>&1)
while [ "$OUTPUT" != "Postman: no process found" ]; do
OUTPUT=$(killall Postman 2>&1)
done
OUTPUT=$(killall _Postman 2>&1)
while [ "$OUTPUT" != "_Postman: no process found" ]; do
OUTPUT=$(killall _Postman 2>&1)
done
Make sure you set the permission for the file correctly so you can execute it:
chmod 700 kill_all_postman_procs.sh
To run it:
./kill_all_postman_procs.sh or may you need to do sudo ./kill_all_postman_procs.sh
It's all about GPU driver and setting, it may happen when you don't force disable that setting and running on dual monitor.
On windows 10, to disable it you can disable it from gpu control panel, POSTMAN_DISABLE_GPU, or try to run postman before plugging the 2nd monitor
FOr all options listed above failed to work. My os is Ubuntu 18. The only solution was to install a version that worked. Before you install this version uninstall the currently installed afterwards install this snap version
snap install --channel=v7/stable postman
If you have this specific version installed. run the following
snap refresh --channel=v7/stable postman
This issue came up overnight for me. I resolved this issue by just reinstalling Postman. It kept all my settings and collections. You might like this quick way instead of fiddling with settings.
According to this - https://github.com/postmanlabs/postman-app-support/issues/9193 and figuring out that issue is not fixed for 2 years, I recommend switching to another tool, like advanced rest client from google.
The instalation of Google Cloud SDK went right.
The problem is when I try to execute a gcloud command (even if gcloud -h) I have this output:
\Google\Cloud was unexpected.
I'm on Windows 10. Python 2.7.17 is correctly setup.
There is already a bug for issues when updating to Cloud SDK version 274.0.0 in Windows. Please check it. As a workaround installing Python in C:\Python27 and then Cloud SDK in C:\Cloud_SDK could help.
I suggest to migrate to Python 3 as Python 2 will not be maintained past 2020. Here is more info about it.
As John Hanley said, my version was broken on Windows. Google has fixed the problem with the version 2.74.0.1.
Thank you all !