使用homebrew-cask

时间:2018-06-06 15:20:22

标签: macos homebrew homebrew-cask hdiutil

我遇到了在MacOS上安装DMG打包应用程序的奇怪问题。以下是我所知道的,但我仍然不知道出了什么问题。

我尝试使用

在MacOS(10.13.4)上安装skypeinkscape等内容
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 doctorbrew cask doctor都没有显示任何问题。我还禁用了LittleSnitch防火墙。我没有安装防病毒程序。安装其他DMG相关软件包都有这个问题。我有时无法安装任何东西。在我看来,这是一个hdiutil或系统问题,而不是任何自制错误。 sudo没有帮助,它会以某种方式显示&#34; Unknown UID&#34;。

但是,通过双击下载的DMG,它可以正常工作,安装就可以了。

请帮忙。

1 个答案:

答案 0 :(得分:0)

唉...

事实证明我使用的是过时的iTerms窗口,其中用户ID已过时。由于这个错误的uid,hdiutil无声地失败。

铃声是sudo错误的uid。希望看过这个问题的人不会遇到我的问题。

相关问题