Terminal Installation Commands

I have a silent install of Symantec Endpoint Protection package and ready to install to several client Mac systems. I am having issues creating a script to execute the installation however.


Please advise:


SYSTEM:~ USERNAME$ sudo /usr/sbin/installer -pkg "/usr/desktop/symantec endpoint protection.mpkg" -target "/usr/applications"


installer: Error the package path specified was invalid: '/usr/desktop/symantec endpoint protection.mpkg'

MacBook Pro, Mac OS X (10.7)

Posted on Aug 2, 2011 5:28 AM

Reply
10 replies

Aug 2, 2011 10:43 AM in response to Linc Davis

Drag the Symantec product to the Trash. Empty.


That is a wholly inappropriate response. It doesn't help the OP in any way shape or form.

It is not for you to say whether the user needs this software or not. Since it's an enterprise solution the chances are this is required as per corporate policy. Telling the user that his corporate policy is wrong is not your role, and the fact is there ARE valid reasons for running such software, especially in large mixed enterprise environments.


As for the actual problem...


sudo /usr/sbin/installer -pkg "/usr/desktop/symantec endpoint protection.mpkg" -target "/usr/applications"


It does seem that the problem is likely one of paths - /usr/desktop and /usr/applications are not standard locations on Mac OS X. UNIX paths are also (generally) case sensitive and I can't imagine Symantec releasing a product that doesn't capitalize their own name or trade marks. In addition, the -target parameter indicates the device to install on to, not the destination directory (the package includes the relative paths for each file)


IF the package is installed on the user's Desktop then I'd expect this to have more chance of success:


sudo /usr/sbin/installer -pkg "~/Desktop/Symantec Endpoint Protection.mpkg" -target /

If the package isn't on the user's desktop, amend the -pkg parameter to point to the correct path.

Aug 2, 2011 5:37 AM in response to adam.maxwell

adam.maxwell wrote:


I have a silent install of Symantec Endpoint Protection package and ready to install to several client Mac systems. I am having issues creating a script to execute the installation however.


Please advise:


SYSTEM:~ USERNAME$ sudo /usr/sbin/installer -pkg "/usr/desktop/symantec endpoint protection.mpkg" -target "/usr/applications"


installer: Error the package path specified was invalid: '/usr/desktop/symantec endpoint protection.mpkg'

Is this-> '/usr/desktop/symantec endpoint protection.mpkg' a valid path? Check the paths in /usr. I wouldn't expect either /usr/applications/ nor /usr/desktop/

Aug 2, 2011 11:15 AM in response to Camelot

Camelot wrote:


sudo /usr/sbin/installer -pkg "~/Desktop/Symantec Endpoint Protection.mpkg" -target /

If the package isn't on the user's desktop, amend the -pkg parameter to point to the correct path.

And is providing the above information more appropriate? The original poster does not seem to have a lot of MacOS X experience. Symantec is not known for their Mac support. Are you sure that the command above will properly install the software? Are you sure it won't delete vital portions of the OS and/or other applications? Granted, it will likely work fine, but I have more confidence in double-clicking it in the Finder.

Aug 2, 2011 12:35 PM in response to etresoft

And is providing the above information more appropriate?


As far as guiding the OP to solve his problem? yes... certainly when taken in context with the rest of the post. I explained why I think his original command failed, provided pointers for more likely options.


Are you sure that the command above will properly install the software?


Am I sure? no, but I included a caveat that I "...expect this to have more chance of success". There are no guarantees since it depends on details that I'm not privvy to, including the actual location of the package itself. Hopefully the rest of the details in my post give sufficient direction.


Are you sure it won't delete vital portions of the OS and/or other applications?


Unlikely. As much as you and I don't like Symantec I doubt their installers are going to do something that draconian. That would put a really big egg over Symantec's face, especially in the enterprise market which is who they cater to.


Granted, it will likely work fine, but I have more confidence in double-clicking it in the Finder


I do prefer the Finder, too. The GUI installer is far preferable for most users, however the OP stated that he was trying to create a silent (presumably headless/unattended) install and that precudes the use of the GUI installer which requires numerous clicks and keyboard input from the user.

At the end of the day, Apple provide a command-line interface to the package installer because it's more convenient in some cases, especially for admins coming from other UNIX/Linux environments. There's nothing wrong with guiding a user through the idosyncrasies of Apple's installer syntax/command line switches.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal Installation Commands

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.