RE: Mac Installation | Insight Agent Documentation
The MacOS .PKG agent installation instructions are incorrect.
The page says this:
"1. After downloading the .pkg
file for the architecture of your choice, open a terminal and navigate to the directory where your download is located.
2. Run the following commands to install the Insight Agent using .pkg
package manager (ensure you substitute the {version}
and {architecture}
placeholder values before executing these commands):
installer -verbose -pkg rapid7-insight-agent-{version}-1.{architecture}.pkg -target /
"
When the pkg file is located in a subdirectory of Downloads, such as ~/Downloads/r7-4.0.9.38-mac__Insight_Agent, I get an uncaught exception error:
mmusgrove@Matthews-MBP ~ % cd ~/Downloads/r7-4.0.9.38-mac__Insight_Agent
mmusgrove@Matthews-MBP r7-4.0.9.38-mac__Insight_Agent % ls
ls: .: Operation not permitted
mmusgrove@Matthews-MBP r7-4.0.9.38-mac__Insight_Agent % installer -verbose -pkg rapid7-insight-agent-4.0.9.38-1.arm64.pkg -target /
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
*** First throw call stack:
(
0 CoreFoundation 0x000000019ab362ec __exceptionPreprocess + 176
1 libobjc.A.dylib 0x000000019a61a158 objc_exception_throw + 60
2 Foundation 0x000000019bbcdad0 +[NSIndexSet allocWithZone:] + 0
3 Foundation 0x000000019bbcd7a8 +[NSURL(NSURL) fileURLWithPath:] + 84
4 Install 0x000000024392e40c -[IFPKGDerivedDocument initWithPath:] + 96
5 Install 0x000000024391c8ec +[IFDocument documentWithPath:] + 172
6 installer 0x000000010074042c installer + 17452
7 installer 0x0000000100745e1c installer + 40476
8 installer 0x0000000100745f10 installer + 40720
9 installer 0x00000001007461e0 installer + 41440
10 dyld 0x000000019a657154 start + 2476
)
libc++abi: terminating due to uncaught exception of type NSException
zsh: abort installer -verbose -pkg rapid7-insight-agent-4.0.9.38-1.arm64.pkg -target /
When the pkg file is located in ~/Downloads, I get another error:
mmusgrove@Matthews-MBP Downloads % installer -verbose -pkg rapid7-insight-agent-4.0.9.38-1.arm64.pkg -target /
installer: Error - the package path specified was invalid: 'rapid7-insight-agent-4.0.9.38-1.arm64.pkg'.
Downloads is a protected directory in MacOS, as is Documents, Desktop and a few other locations.