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

2021-02-21 22:49:23 +08:00
 fx

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/openssl@1.1/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/openssl@1.1/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/python@3.9/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>.
5913 次点击
所在节点    MacBook Pro
21 条回复
fx
2021-02-21 23:04:04 +08:00
BrettD
2021-02-22 05:50:51 +08:00
升级 11.2.1 没遇到这问题,一切正常。看报错看上去是二进制代码签名的问题,把 Homebrew 安装的软件包重新安装试一下
fx
2021-02-22 07:11:25 +08:00
@BrettD 二进制代码签名, 这个怎么看出来的?

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

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

brew uninstall xxx
然后 xcode-select --install

试试看
fx
2021-02-22 12:56:21 +08:00
@joe7z 我用 brew 安装 python,postinstall 安装 pip 的时候死了
joe7z
2021-02-22 13:23:57 +08:00
@fx 所以可能是 brew 安装的包的问题,最好去查看一下包是否已经支持 M1 芯片,不支持的话,还是卸载了吧,然后用 rosetta 方式安装
fx
2021-02-22 15:13:00 +08:00
@joe7z
@BrettD 重新安装 homebrew 可以了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/754917

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX