我正在尝试从命令行在 Mac 上安装我们的产品:
$ installer -package /Volumes/setup.pkg/setup.pkg -target /Volumes/MacOS -verbose
installer: Package name is Foo
installer: Upgrading at base path /
installer: Preparing for installation….....
installer: Preparing the disk….....
installer: Preparing Foo….....
installer: Waiting for other installations to complete….....
installer: Configuring the installation….....
installer:
installer: Writing files….....
#
installer: Writing files….....
#
installer: Writing files….....
#
installer: Moving items into place….....
##
installer: The upgrade failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
从 GUI 运行时一切正常。sudo
没有帮助。我该如何调试?至少我需要一个信息更丰富的日志。将非常感激。
自原始发布以来的附加信息:当从 GUI 运行时,应用程序安装到运行它的用户的 ${HOME}/Library 中(如预期的那样)。从命令行运行时,它会尝试将其安装到 /Library 中(甚至复制那里的一些文件,但不是所有文件)。