How to install a Mac application using Terminal

前端 未结 2 802
深忆病人
深忆病人 2021-01-30 23:21

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 pa         


        
相关标签:
2条回答
  • 2021-01-30 23:47

    To disable inputting password:

    sudo visudo
    

    Then add a new line like below and save then:

    # The user can run installer as root without inputting password
    yourusername ALL=(root) NOPASSWD: /usr/sbin/installer
    

    Then you run installer without password:

    sudo installer -pkg ...
    
    0 讨论(0)
  • 2021-01-31 00:01

    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 /
    
    0 讨论(0)
提交回复
热议问题