Error while installing the triggercmdagent
-
Hello,
because of a stupid mistake i had to reinstall my raspberry pi.I used these instructions: https://docs.triggercmd.com/#/./InstallRaspberryPi
But if i try to install with
sudo apt install ./triggercmdagent_1.0.1_all.deb
i get the follogwing errors:Get:1 /home/hannibal/downloads/triggercmdagent_1.0.1_all.deb triggercmdagent all 1.0.1 [22.2 MB] (Reading database ... 91248 files and directories currently installed.) Preparing to unpack .../triggercmdagent_1.0.1_all.deb ... Unpacking triggercmdagent (1.0.1) ... dpkg-deb (subprocess): decompressing archive '/home/hannibal/downloads/triggercmdagent_1.0.1_all.deb' (size=22246140) member 'data.tar': lzma error: compressed data is corrupt dpkg-deb: error: <decompress> subprocess returned error exit status 2 dpkg: error processing archive /home/hannibal/downloads/triggercmdagent_1.0.1_all.deb (--unpack): cannot copy extracted data for './usr/share/triggercmdagent/app/src/node.exe' to '/usr/share/triggercmdagent/app/src/node.exe.dpkg-new': unexpected end of file or stream Errors were encountered while processing: /home/hannibal/downloads/triggercmdagent_1.0.1_all.deb Notice: Download is performed unsandboxed as root as file '/home/hannibal/downloads/triggercmdagent_1.0.1_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) Error: Sub-process /usr/bin/dpkg returned an error code (1)If i read that right the installation file is corrupted, so i tried several times to download the file, but the error is the same every time.
So either the file is corrupted or i am doing something wrong, anyone any idea how what to do?
I hope this is all ok to read, english is not my strong side.
Greetings Hannibal
-
@Hannibal, thank you for reporting it! I tested it and ran into the same problem at first, but it's fixed now. Please download it again and try the install again.
-
@Russ It seems there is more:
hannibal@PI-3:~/downloads $ sudo apt install ./triggercmdagent_1.0.1_all.deb Note, selecting 'triggercmdagent' instead of './triggercmdagent_1.0.1_all.deb' Installing: triggercmdagent Summary: Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 0 Download size: 0 B / 22.2 MB Space needed: 0 B / 25.8 GB available Get:1 /home/hannibal/downloads/triggercmdagent_1.0.1_all.deb triggercmdagent all 1.0.1 [22.2 MB] Selecting previously unselected package triggercmdagent. (Reading database ... 73934 files and directories currently installed.) Preparing to unpack .../triggercmdagent_1.0.1_all.deb ... Unpacking triggercmdagent (1.0.1) ... Setting up triggercmdagent (1.0.1) ... Installing dependenencies from NPM npm warn config production Use `--omit=dev` instead. npm warn Unknown cli config "--unsafe-perm". This will stop working in the next major version of npm. npm warn deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm warn deprecated har-validator@5.1.5: this library is no longer supported npm warn deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm warn deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm warn deprecated posix-argv-parser@2.0.0: No longer maintained added 266 packages, and audited 267 packages in 29s 7 packages are looking for funding run `npm fund` for details 14 vulnerabilities (9 moderate, 3 high, 2 critical) To address issues that do not require attention, run: npm audit fix To address all issues possible (including breaking changes), run: npm audit fix --force Some issues need review, and may require choosing a different dependency. Run `npm audit` for details. Notice: Download is performed unsandboxed as root as file '/home/hannibal/downloads/triggercmdagent_1.0.1_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)As you can see, the installation was not succesfull.
And i am again in over my head
-
@Hannibal said in Error while installing the triggercmdagent:
Notice: Download is performed unsandboxed as root as file '/home/hannibal/downloads/triggercmdagent_1.0.1_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Copy/paste that into ChatGPT to know why, but you can safely ignore that "Notice". Basically it means the _apt user doesn't have access to your user's home directory where the .deb file is, so it's using root to access it instead.
It looks like the agent is installed now, so you can move on to the next step:
node /usr/lib/triggercmdagent/resources/app/src/agent.js --consoleIt should prompt you for a token which you can copy/paste from the Instructions page while logged in at https://www.triggercmd.com