0

I am following the instructions in here to install the Ops agent on my local Windows machine.

These are the steps that I follow in PowerShell (as admin):

(New-Object Net.WebClient).DownloadFile("https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.ps1", "${env:UserProfile}\add-google-cloud-ops-agent-repo.ps1") Invoke-Expression "${env:UserProfile}\add-google-cloud-ops-agent-repo.ps1 -AlsoInstall"

As soon as I execute this, the output is:

googet : The term 'googet' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\bot_runner_01\add-google-cloud-ops-agent-repo.ps1:171 char:10
+   if (! (googet listrepos | Select-String -quiet "https://packages.cl ...
+          ~~~~~~
    + CategoryInfo          : ObjectNotFound: (googet:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

googet : The term 'googet' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\bot_runner_01\add-google-cloud-ops-agent-repo.ps1:198 char:24
+   if (! $Version -and (googet listrepos | Select-String -quiet "https ...
+                        ~~~~~~
    + CategoryInfo          : ObjectNotFound: (googet:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

googet : The term 'googet' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\bot_runner_01\add-google-cloud-ops-agent-repo.ps1:205 char:10
+   if (! (googet installed google-cloud-ops-agent 2>&1 | Select-String ...
+          ~~~~~~
    + CategoryInfo          : ObjectNotFound: (googet:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

No changes made.

How can I fix this? thank you

Andoni
  • 89
  • 10
  • Googet is a package repository solution primarily designed for Windows: https://github.com/google/googet My guess is you have found a bug. Edit your question and show the exact steps you followed with the results (command output). – John Hanley Sep 07 '22 at 08:35
  • Thanks for the answer! Definitely the utility is not working (tried both on my Windows 10 local machine and on a Windo Server 2019 Standard) and same 'googet' error... – Andoni Sep 07 '22 at 09:09
  • I recommend creating an Issue Tracker (bug report) here: https://cloud.google.com/support/docs/issue-trackers – John Hanley Sep 07 '22 at 20:51
  • May it be due to the fact that I am trying to install it in a local computer instead of within a GCP Instance? – Andoni Sep 08 '22 at 14:25
  • You have the PowerShell script. Debug it to know why. – John Hanley Sep 08 '22 at 17:23
  • 1
    Not a bug; neither Ops Agent nor GooGet are supported on local machines in this manner. From [the official documentation](https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/installation#before_you_begin), a supported VM instance in a Google Cloud project is required to install Ops Agent. And from [the GooGet repo](https://github.com/google/googet): "GooGet is shipped with the official Google Cloud Platform Windows images and is used to maintain the guest environment." – Jeff Sep 20 '22 at 00:13
  • 1
    @Jeff - Can you post that as the official answer? – John Hanley Sep 20 '22 at 00:48

1 Answers1

1

I had the same issue, found that running the 'Installing the guest environment' scripts in the page below worked for me: https://cloud.google.com/compute/docs/images/install-guest-environment?authuser=0#installing_guest_environment