如何安装使用终端的Mac应用程序 [英] How to install a Mac application using Terminal

查看:480
本文介绍了如何安装使用终端的Mac应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apple建议在提交到Mac应用商店之前,使用命令

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 /

从上面的命令我得到

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?

推荐答案

您的问题..

您的包路径中有空格吗?
您应该用双引号将它换行以保证安全,否则可以将其视为两个单独的参数。

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 /

这篇关于如何安装使用终端的Mac应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆