fx
3.81D

apple m1 用户升级完有没有遇到 安装啥都被 killed

  •  
  •   fx · Feb 21, 2021 · 6777 views
    This topic created in 1909 days ago, the information mentioned may be changed or developed.

    rbenv 编译 ruby

    generating arm64-darwin20-fake.rb
    arm64-darwin20-fake.rb updated
    ./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems -r./arm64-darwin20-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --rdoc-output=".ext/rdoc" --html-output=".ext/html"
    make: *** [do-install-all] Killed: 9
    

    pyenv 编译 python

    /bin/sh: line 1: 59082 Killed: 9               CC='clang' LDSHARED='clang -bundle -undefined dynamic_lookup -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/lidashuang/.pyenv/versions/3.9.2/lib -L/opt/homebrew/opt/[email protected]/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/lidashuang/.pyenv/versions/3.9.2/lib -L/opt/homebrew/opt/[email protected]/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib  ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python.exe -E ./setup.py $quiet build
    
    

    homebrew 安装 python

    subprocess.CalledProcessError: Command '['/opt/homebrew/opt/[email protected]/bin/python3.9', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/private/tmp/tmp7q_qlu62/setuptools-49.2.1-py3-none-any.whl\', \'/private/tmp/tmp7q_qlu62/pip-20.2.3-py2.py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/private/tmp/tmp7q_qlu62\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' died with <Signals.SIGKILL: 9>.
    
    Supplement 1  ·  Feb 22, 2021
    好多
    Service exited due to SIGKILL | sent by mds[98]
    Supplement 2  ·  Feb 22, 2021
    重新安装 homebrew 可以了
    21 replies    2021-02-22 23:30:50 +08:00
    BrettD
        2
    BrettD  
       Feb 22, 2021 via iPhone
    升级 11.2.1 没遇到这问题,一切正常。看报错看上去是二进制代码签名的问题,把 Homebrew 安装的软件包重新安装试一下
    fx
        3
    fx  
    OP
       Feb 22, 2021
    @BrettD 二进制代码签名, 这个怎么看出来的?

    源码编译也是被 killed
    spiraldox
        4
    spiraldox  
       Feb 22, 2021
    执行 xcode-select --install 更新 xcode 试试
    BrettD
        5
    BrettD  
       Feb 22, 2021 via iPhone
    我以前在 M1 编译 libgcrypt 的时候也是遇到 Killed 9 的报错,后来发现原因是测试脚本会修改其中一个二进制文件的内容,导致代码签名校验失败被系统杀掉,最后在脚本里面加了一行重新代码签名解决了问题。

    你这个情况在系统错误日志里面可以查到被杀的原因,有助于调查。代码签名无效是我的一个猜测。
    kalimpong
        6
    kalimpong  
       Feb 22, 2021
    嗯,应该是 xcode 命令行工具掉了
    fx
        7
    fx  
    OP
       Feb 22, 2021
    @spiraldox 这个已经跑过了
    xcode-select --install
    xcode-select: error: command line tools are already installed, use "Software Update" to install updates
    fx
        8
    fx  
    OP
       Feb 22, 2021
    Feb 22 08:29:10 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[65640]): Binary is improperly signed.
    Feb 22 08:29:10 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
    Feb 22 08:29:10 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[65639]): Binary is improperly signed.
    Feb 22 08:29:10 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
    Feb 22 08:29:13 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0F000000-0200-0000-0000-000000000000[65616]): Service exited due to SIGKILL | sent by mds[98]
    Feb 22 08:29:13 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0E000000-0700-0000-0000-000000000000[65562]): Service exited due to SIGKILL | sent by mds[98]
    Feb 22 08:29:13 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.09000000-0300-0000-0000-000000000000[65582]): Service exited due to SIGKILL | sent by mds[98]
    Feb 22 08:29:20 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[65982]): Binary is improperly signed.
    fx
        9
    fx  
    OP
       Feb 22, 2021
    Service exited due to SIGKILL | sent by mds
    BrettD
        10
    BrettD  
       Feb 22, 2021 via iPhone
    Binary is improperly signed.
    应该就是代码签名不正确的原因。自己编译运行一个 C 语言的 hello world 程序能不能跑起来?
    fx
        11
    fx  
    OP
       Feb 22, 2021
    @BrettD 可以跑
    BrettD
        12
    BrettD  
       Feb 22, 2021 via iPhone
    那就把不能运行的软件重新安装一遍
    BrettD
        13
    BrettD  
       Feb 22, 2021 via iPhone
    这么大范围的代码签名失效是不是中病毒了……
    fx
        14
    fx  
    OP
       Feb 22, 2021
    @BrettD 应该不是病毒
    SingeeKing
        15
    SingeeKing  
    PRO
       Feb 22, 2021
    同款 Mac,完全未遇到过
    fx
        16
    fx  
    OP
       Feb 22, 2021
    @SingeeKing 升级完突然出现的
    joe7z
        17
    joe7z  
       Feb 22, 2021
    我想问问,你是不是用 brew 安装东西了。
    我用 brew 安装了 git,也出现这个问题。

    brew uninstall xxx
    然后 xcode-select --install

    试试看
    fx
        18
    fx  
    OP
       Feb 22, 2021
    @joe7z 我用 brew 安装 python,postinstall 安装 pip 的时候死了
    joe7z
        19
    joe7z  
       Feb 22, 2021
    @fx 所以可能是 brew 安装的包的问题,最好去查看一下包是否已经支持 M1 芯片,不支持的话,还是卸载了吧,然后用 rosetta 方式安装
    fx
        20
    fx  
    OP
       Feb 22, 2021
    @joe7z
    @BrettD 重新安装 homebrew 可以了
    BrettD
        21
    BrettD  
       Feb 22, 2021 via iPhone
    @joe7z Homebrew 下载的是 ARM 架构的包,如果没有会下载源代码编译安装,不会下错包,楼主这个情况很奇怪
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2970 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 09:33 · PVG 17:33 · LAX 02:33 · JFK 05:33
    ♥ Do have faith in what you're doing.