我在 MacOS 上安装 DMG 打包应用程序时遇到了一个奇怪的问题。以下是我所知道的,但我仍然不知道出了什么问题。
我尝试使用skype
或inkscape
在 MacOS (10.13.4) 上安装类似的东西
brew cask install skype --debug
但它挂起,输出如下。
==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://inkscape.org/gallery/item/11269/Inkscape-0.92.2-1-x11-10.7-x86_64.dmg
Already downloaded: /Users/hwwu/Library/Caches/Homebrew/Cask/inkscape--0.92.2-1,11269.dmg
==> Downloaded to -> /Users/hwwu/Library/Caches/Homebrew/Cask/inkscape--0.92.2-1,11269.dmg
==> Verifying download
==> Determining which verifications to run for Cask inkscape
==> Checking for verification class Hbc::Verify::Checksum
==> 1 verifications defined
Hbc::Verify::Checksum
==> Running verification of class Hbc::Verify::Checksum
==> Verifying checksum for Cask inkscape
==> SHA256 checksums match
==> Installing Cask inkscape
==> Hbc::Installer#stage
==> Extracting primary container
==> Determining which containers to use based on filetype
==> Checking container class Hbc::Container::Pkg
==> Checking container class Hbc::Container::Ttf
==> Checking container class Hbc::Container::Otf
==> Checking container class Hbc::Container::Air
==> Checking container class Hbc::Container::Cab
==> Checking container class Hbc::Container::Dmg
==> Executing: ["/usr/bin/hdiutil", "imageinfo", "/Users/hwwu/Library/Caches/Homebrew/Cask/inkscape--0.92.2-1,11269.dmg"]
==> Using container class Hbc::Container::Dmg for /Users/hwwu/Library/Caches/Homebrew/Cask/inkscape--0.92.2-1,11269.dmg
==> Executing: ["/usr/bin/hdiutil", "attach", "-plist", "-nobrowse", "-readonly", "-noidme", "-mountrandom", "/var/tmp/d20180606-25779-z2yt24", "/Users/hwwu/Library/Caches/Homebrew/Cask/inkscape--0.92.2-1,11269.dmg"]
所以我手动尝试了最后一行
/usr/bin/hdiutil attach -verbose -debug -plist -nobrowse -readonly -noidme -mountrandom /var/tmp/ /Users/hwwu/Library/Caches/Homebrew/Cask/skype--8.22.0.2.dmg
它挂起并显示
calling DIHLDiskImageAttach with
mount-type: randomized
drive-options:
force-idme: false
quiet: false
mount-point: file:///var/tmp/
verbose: true
debug: true
read-only: true
agent: hdiutil
skip-idme: true
image-options:
main-url: file:///Users/hwwu/Library/Caches/Homebrew/Cask/skype--8.22.0.2.dmg
2018-06-06 11:14:26.858 hdiutil[27659:45934024] DIHLDiskImageAttach: input dictionary {
agent = hdiutil;
debug = 1;
"drive-options" = {
};
"force-idme" = 0;
"image-options" = {
};
"main-url" = "file:///Users/hwwu/Library/Caches/Homebrew/Cask/skype--8.22.0.2.dmg";
"mount-point" = "file:///var/tmp/";
"mount-type" = randomized;
quiet = 0;
"read-only" = 1;
"skip-idme" = 1;
verbose = 1;
}
2018-06-06 11:14:26.859 hdiutil[27659:45934024] DIHLDiskImageAttach: disabling legacy image format attach
2018-06-06 11:14:26.859 hdiutil[27659:45934024] DIHLDiskImageAttach: newImagekeys = {
"legacy-disabled" = 1;
}
2018-06-06 11:14:26.859 hdiutil[27659:45934024] DIHLDiskImageAttach: creating DIHelperProxy
2018-06-06 11:14:26.859 hdiutil[27659:45934024] with dictionary: {
agent = hdiutil;
debug = 1;
"drive-options" = <62706c69 73743030 d0080000 00000000 01010000 00000000 00010000 00000000 00000000 00000000 0009>;
"force-idme" = 0;
"image-options" = <62706c69 73743030 d101025f 100f6c65 67616379 2d646973 61626c65 6409080b 1d000000 00000001 01000000 00000000 03000000 00000000 00000000 00000000 1e>;
"main-url" = "file:///Users/hwwu/Library/Caches/Homebrew/Cask/skype--8.22.0.2.dmg";
"mount-point" = "file:///var/tmp/";
"mount-type" = randomized;
operation = DIHelperAttach;
quiet = 0;
"read-only" = 1;
"skip-idme" = 1;
verbose = 1;
}
2018-06-06 11:14:26.859 hdiutil[27659:45934024] [DIHelperProxy alloc]
2018-06-06 11:14:26.863 hdiutil[27659:45934024] [DIHelperProxy alloc] returning self 0x7fddcf407ba0, retainCount 1
2018-06-06 11:14:26.863 hdiutil[27659:45934024] DIHLDiskImageAttach: running DIHelperProxy
2018-06-06 11:14:26.864 hdiutil[27659:45934024] [DIHelperProxy performOperationReturning] entry
2018-06-06 11:14:26.864 hdiutil[27659:45934024] [DIHelperProxy performOperationReturning] detaching thread
2018-06-06 11:14:26.865 hdiutil[27659:45934029] [DIHelperProxy workerThread] entry
2018-06-06 11:14:26.865 hdiutil[27659:45934029] [DIHelperProxy workerThread] setting up server
2018-06-06 11:14:26.865 hdiutil[27659:45934029] [DIHelperProxy threadSetupServer] entry
2018-06-06 11:14:26.865 hdiutil[27659:45934029] XPC: created intermediaryConnection connection
2018-06-06 11:14:26.865 hdiutil[27659:45934029] XPC: creating helperconnection connection
两者都brew doctor
没有brew cask doctor
问题的迹象。我还禁用了 LittleSnitch 防火墙。我没有安装防病毒程序。安装其他DMG相关包都有这个问题。我已经有一段时间无法安装任何东西了。在我看来,这是一个hdiutil
或系统问题,而不是任何自制错误。sudo
没有帮助,它以某种方式显示“未知的 UID”。
但是,通过双击下载的 DMG,它就可以正常工作,并且安装也很好。
请帮忙。