如何使用终端安装 Mac 应用程序
苹果建议在提交到Mac应用程序商店之前,使用以下命令测试Mac的安装过程
sudo installer -store -pkg path-to-package -target /
我将应用程序包保存到桌面,然后在终端中发送命令
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]>
我很新到终端。这是什么意思?如何修复它以便我可以按照 Apple 的建议安装应用程序?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能不完全是你的问题..
你的包路径中有空格吗?
为了安全起见,您应该将其用双引号括起来,否则它可以被视为两个单独的参数
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
要禁用输入密码:
然后添加如下所示的新行并保存:
然后无需密码即可运行安装程序:
To disable inputting password:
Then add a new line like below and save then:
Then you run installer without password: