V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
fx
V2EX  ›  MacBook Pro

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

  •  
  •   fx · 2021-02-21 22:49:23 +08:00 · 4974 次点击
    这是一个创建于 459 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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>.
    
    第 1 条附言  ·  2021-02-22 08:39:36 +08:00
    好多
    Service exited due to SIGKILL | sent by mds[98]
    第 2 条附言  ·  2021-02-22 15:12:39 +08:00
    重新安装 homebrew 可以了
    21 条回复    2021-02-22 23:30:50 +08:00
    BrettD
        2
    BrettD  
       2021-02-22 05:50:51 +08:00 via iPhone
    升级 11.2.1 没遇到这问题,一切正常。看报错看上去是二进制代码签名的问题,把 Homebrew 安装的软件包重新安装试一下
    fx
        3
    fx  
    OP
       2021-02-22 07:11:25 +08:00
    @BrettD 二进制代码签名, 这个怎么看出来的?

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

    你这个情况在系统错误日志里面可以查到被杀的原因,有助于调查。代码签名无效是我的一个猜测。
    wydinhk
        6
    wydinhk  
       2021-02-22 08:19:35 +08:00
    嗯,应该是 xcode 命令行工具掉了
    fx
        7
    fx  
    OP
       2021-02-22 08:26:05 +08:00
    @spiraldox 这个已经跑过了
    xcode-select --install
    xcode-select: error: command line tools are already installed, use "Software Update" to install updates
    fx
        8
    fx  
    OP
       2021-02-22 08:29:45 +08:00
    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
       2021-02-22 08:32:04 +08:00
    Service exited due to SIGKILL | sent by mds
    BrettD
        10
    BrettD  
       2021-02-22 08:39:27 +08:00 via iPhone
    Binary is improperly signed.
    应该就是代码签名不正确的原因。自己编译运行一个 C 语言的 hello world 程序能不能跑起来?
    fx
        11
    fx  
    OP
       2021-02-22 08:40:36 +08:00
    @BrettD 可以跑
    BrettD
        12
    BrettD  
       2021-02-22 08:41:43 +08:00 via iPhone
    那就把不能运行的软件重新安装一遍
    BrettD
        13
    BrettD  
       2021-02-22 08:44:24 +08:00 via iPhone
    这么大范围的代码签名失效是不是中病毒了……
    fx
        14
    fx  
    OP
       2021-02-22 11:34:22 +08:00
    @BrettD 应该不是病毒
    SingeeKing
        15
    SingeeKing  
       2021-02-22 11:37:31 +08:00
    同款 Mac,完全未遇到过
    fx
        16
    fx  
    OP
       2021-02-22 11:50:01 +08:00
    @SingeeKing 升级完突然出现的
    joe7z
        17
    joe7z  
       2021-02-22 12:26:46 +08:00
    我想问问,你是不是用 brew 安装东西了。
    我用 brew 安装了 git,也出现这个问题。

    brew uninstall xxx
    然后 xcode-select --install

    试试看
    fx
        18
    fx  
    OP
       2021-02-22 12:56:21 +08:00
    @joe7z 我用 brew 安装 python,postinstall 安装 pip 的时候死了
    joe7z
        19
    joe7z  
       2021-02-22 13:23:57 +08:00
    @fx 所以可能是 brew 安装的包的问题,最好去查看一下包是否已经支持 M1 芯片,不支持的话,还是卸载了吧,然后用 rosetta 方式安装
    fx
        20
    fx  
    OP
       2021-02-22 15:13:00 +08:00
    @joe7z
    @BrettD 重新安装 homebrew 可以了
    BrettD
        21
    BrettD  
       2021-02-22 23:30:50 +08:00 via iPhone
    @joe7z Homebrew 下载的是 ARM 架构的包,如果没有会下载源代码编译安装,不会下错包,楼主这个情况很奇怪
    关于   ·   帮助文档   ·   API   ·   FAQ   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   2607 人在线   最高记录 5497   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 12:28 · PVG 20:28 · LAX 05:28 · JFK 08:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.