美文网首页
mac系统安装库错误总结

mac系统安装库错误总结

作者: Icy_Summer | 来源:发表于2022-08-01 11:24 被阅读0次
    1. HomeBrew安装 apktool时,报错
      fatal: not in a git directory
      Error: Command failed with exit 128: git
      原因是 homebrew 没有指定仓库,执行命令 brew -v,根据提示依次设置即可。
      执行命令如下:
    Mac:~macUser$ brew install apktool
    
    ....
    ....
    ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
    #######################################################################   98.7%curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
    
    Error: apktool: Failed to download resource "apktool"
    Download failed: https://ghcr.io/v2/homebrew/core/apktool/blobs/sha256:fd6c85028454c8a6ec977fcdd9b22fea21cf9abbc13590255b1796e119130e32
    Mac:~macUser$ brew install apktool
    ....
    ....
    ==> Installing dependencies for apktool: openjdk
    ==> Installing apktool dependency: openjdk
    fatal: not in a git directory
    Error: Command failed with exit 128: git
    
    Mac:~macUser$ brew -v
    Homebrew 3.5.2-181-g2b01354
    fatal: unsafe repository ('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core' is owned by someone else)
    To add an exception for this directory, call:
    
        git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
    Homebrew/homebrew-core (no Git repository)
    fatal: unsafe repository ('/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask' is owned by someone else)
    To add an exception for this directory, call:
    
        git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
    Homebrew/homebrew-cask (no Git repository)
    CyoudeMac-mini:~ cyou$ git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
    CyoudeMac-mini:~ cyou$ git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask
    
    CyoudeMac-mini:~ cyou$ brew -v
    Homebrew 3.5.2-181-g2b01354
    Homebrew/homebrew-core (git revision e156c279eba; last commit 2022-06-28)
    Homebrew/homebrew-cask (git revision 876edb5c28; last commit 2022-06-28)
    
    
    Mac:~macUser$ brew install apktool
    Warning: No remote 'origin' in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services, skipping update!
    ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/openjdk-18.0.1.1.monterey.bottle.tar.gz
    Already downloaded: /Users/cyou/Library/Caches/Homebrew/downloads/cbf94a08f8d8c63ca162c1f3c3bc45ca22f5ba29c5e08ea5d5a3a9f8d6fe0fcf--openjdk-18.0.1.1.monterey.bottle.tar.gz
    ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/apktool-2.6.1.all.bottle.tar.gz
    Already downloaded: /Users/cyou/Library/Caches/Homebrew/downloads/972a86d1bae4cbf31cfcf93cb62b30b9abda8d7a46edd22f12810304faa2a252--apktool-2.6.1.all.bottle.tar.gz
    ==> Installing dependencies for apktool: openjdk
    ==> Installing apktool dependency: openjdk
    ==> Pouring openjdk-18.0.1.1.monterey.bottle.tar.gz
    🍺  /usr/local/Cellar/openjdk/18.0.1.1: 641 files, 307.7MB
    ==> Installing apktool
    ==> Pouring apktool-2.6.1.all.bottle.tar.gz
    🍺  /usr/local/Cellar/apktool/2.6.1: 4 files, 19MB
    ==> `brew cleanup` has not been run in the last 30 days, running now...
    Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
    Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
    Removing: /Users/cyou/Library/Logs/Homebrew/openjdk... (64B)
    
    

    相关文章

      网友评论

          本文标题:mac系统安装库错误总结

          本文链接:https://www.haomeiwen.com/subject/lhqrwrtx.html