netvolt / LinuxRMM-Script

To help users that want to add Linux Agents to Tactical RMM, without need to pay upfront for code signed agents. Thanks to @ZoLuSs for the initial commit. If this solution works for you, consider contributing to Tactical RMM project!
MIT License
89 stars 39 forks source link

Unable to install/update on Raspberry Pi #13

Closed realcanadrian closed 1 year ago

realcanadrian commented 1 year ago

I'm installing on a Raspberry Pi 3B with Ubuntu Server on it. The script seems to proceed normally until the end, when it looks like whatever it's expecting to be in /tmp is not there:

Saving to: ‘/tmp/rmmagent.zip’

/tmp/rmmagent.zip                                      [ <=>                                                                                                           ]  90.40K   495KB/s    in 0.2s

2023-06-07 13:44:23 (495 KB/s) - ‘/tmp/rmmagent.zip’ saved [92565]

Archive:  /tmp/rmmagent.zip
41218f104ac225fef5b70dc9fcd2432c89c5d0ad
   creating: /tmp/rmmagent-master/
   creating: /tmp/rmmagent-master/.github/
   creating: /tmp/rmmagent-master/.github/workflows/
  inflating: /tmp/rmmagent-master/.github/workflows/ci.yml
  inflating: /tmp/rmmagent-master/.gitignore
   creating: /tmp/rmmagent-master/.vscode/
  inflating: /tmp/rmmagent-master/.vscode/settings.json
  inflating: /tmp/rmmagent-master/LICENSE.md
  inflating: /tmp/rmmagent-master/README.md
   creating: /tmp/rmmagent-master/agent/
  inflating: /tmp/rmmagent-master/agent/agent.go
  inflating: /tmp/rmmagent-master/agent/agent_unix.go
  inflating: /tmp/rmmagent-master/agent/agent_windows.go
  inflating: /tmp/rmmagent-master/agent/checkin.go
  inflating: /tmp/rmmagent-master/agent/checks.go
  inflating: /tmp/rmmagent-master/agent/choco_windows.go
  inflating: /tmp/rmmagent-master/agent/eventlog_windows.go
  inflating: /tmp/rmmagent-master/agent/install.go
  inflating: /tmp/rmmagent-master/agent/install_unix.go
  inflating: /tmp/rmmagent-master/agent/install_windows.go
  inflating: /tmp/rmmagent-master/agent/patches_windows.go
  inflating: /tmp/rmmagent-master/agent/process.go
  inflating: /tmp/rmmagent-master/agent/rpc.go
  inflating: /tmp/rmmagent-master/agent/services_windows.go
  inflating: /tmp/rmmagent-master/agent/software_windows_386.go
  inflating: /tmp/rmmagent-master/agent/software_windows_amd64.go
  inflating: /tmp/rmmagent-master/agent/svc.go
  inflating: /tmp/rmmagent-master/agent/syscall_windows.go
  inflating: /tmp/rmmagent-master/agent/tasks_windows.go
  inflating: /tmp/rmmagent-master/agent/utils.go
  inflating: /tmp/rmmagent-master/agent/wmi_windows.go
  inflating: /tmp/rmmagent-master/agent/wua_windows.go
   creating: /tmp/rmmagent-master/build/
  inflating: /tmp/rmmagent-master/build/rmm.exe.manifest
  inflating: /tmp/rmmagent-master/build/setup.iss
  inflating: /tmp/rmmagent-master/go.mod
  inflating: /tmp/rmmagent-master/go.sum
  inflating: /tmp/rmmagent-master/main.go
   creating: /tmp/rmmagent-master/shared/
  inflating: /tmp/rmmagent-master/shared/types.go
  inflating: /tmp/rmmagent-master/versioninfo.json
env: ‘go’: No such file or directory
cp: cannot stat '/tmp/temp_rmmagent': No such file or directory
./rmmagent-linux.sh: line 187: /tmp/temp_rmmagent: No such file or directory
rm: cannot remove '/tmp/temp_rmmagent': No such file or directory
Tactical Agent Install is done

The command I'm using is sudo ./rmmagent-linux.sh install 'armv6' 'https://mesh.[REDACTED].net/meshagents?id=[REDACTED]&installflags=0&meshinstall=6' 'https://api.[REDACTED].net' '1' '1' '[REDACTED]' 'server'

ZenDevMaster commented 1 year ago

The key error is

env: ‘go’: No such file or directory

The golang installation isn't working, or it's not in the path. Check if you've got anything here:

root@raspberrypi:/usr/local/go/bin# /usr/local/go/bin/go version
go version go1.18.6 linux/arm
realcanadrian commented 1 year ago

This is so weird. It looks like it's there but it doesn't work:

root@pihole3:/usr/local/go/bin# ls
go  gofmt
root@pihole3:/usr/local/go/bin# /usr/local/go/bin/go version
bash: /usr/local/go/bin/go: No such file or directory
realcanadrian commented 1 year ago

I figured this out. I did a sudo apt install golang and it installed a ton of prerequisites as well. Then the script worked fine. So it looks like my Ubuntu install on my Pi did not by default include whatever is needed to make Go... go. 🙂