Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install a Mac application using Terminal

Tags:

Apple suggests that prior to submitting to the Mac application store, the installation process for Macs be tested using the command

sudo installer -store -pkg path-to-package -target / 

I saved the application package to the desktop and then in the terminal I sent the command

sudo installer -store -pkg /User/MyName/Desktop/helloWorld.pkg -target / 

From the above command I get this

installer: invalid option - Usage: installer [-help] [-dominfo] [-volinfo] [-pkginfo] [-allow] [-dumplog]                  [-verbose | -verboseR] [-vers] [-config] [-plist]                  [-file <pathToFile>] [-lang <ISOLanguageCode>] [-listiso]                  [-showChoicesXML] [-applyChoiceChangesXML <pathToFile>]                  [-showChoicesAfterApplyingChangesXML <pathtoFile>]                  -pkg <pathToPackage>                  -target <[DomainKey|MountPoint|DiskIdentifier|DeviceNode|UUID]> 

I am very new to the Terminal. What does this mean and how do I fix it so that I can install the application as suggested by Apple?

like image 609
David Avatar asked Dec 08 '10 05:12

David


People also ask

How do I install a program using terminal?

To install any package, just open a terminal ( Ctrl + Alt + T ) and type sudo apt-get install <package name> . For instance, to get Chrome type sudo apt-get install chromium-browser . SYNAPTIC: Synaptic is a graphical package management program for apt.

How do I install an application on a Mac?

Select App Store from the Apple menu and the Mac App Store will open. When signed in with your Apple ID, you can download apps: click Get and then install app for a free app, or one with in-app purchases, or click the price label for a paid one. In-app purchases are indicated next to the Get button, if there are any.


1 Answers

Probably not exactly your issue..

Do you have any spaces in your package path? You should wrap it up in double quotes to be safe, otherwise it can be taken as two separate arguments

sudo installer -store -pkg "/User/MyName/Desktop/helloWorld.pkg" -target / 
like image 162
Ben Avatar answered Nov 13 '22 22:11

Ben