简体   繁体   中英

apple m1 with macOS Big Sur 11.2.1 install soft faild, with killed error

在此处输入图像描述

when rbenv install 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

when pyenv install 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

when homebrew install 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>.

died with <Signals.SIGKILL: 9>.

system logs

Feb 22 08:36:31 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[78933]): Binary is improperly signed.
Feb 22 08:36:31 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:36:41 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[80633]): Binary is improperly signed.
Feb 22 08:36:41 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:36:41 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[80634]): Binary is improperly signed.
Feb 22 08:36:41 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:36:43 dashuangdeMacBook-Pro Google Chrome Helper[634]: Libnotify: notify_register_coalesced_registration failed with code 9 on line 2835
Feb 22 08:36:49 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0F000000-0500-0000-0000-000000000000[78921]): Service exited due to SIGKILL | sent by mds[98]
Feb 22 08:36:51 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[82032]): Binary is improperly signed.
Feb 22 08:36:51 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:36:51 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[82031]): Binary is improperly signed.
Feb 22 08:36:51 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:37:01 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[83275]): Binary is improperly signed.
Feb 22 08:37:01 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:37:01 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[83274]): Binary is improperly signed.
Feb 22 08:37:01 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:37:03 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0E000000-0200-0000-0000-000000000000[78506]): Service exited due to SIGKILL | sent by mds[98]
Feb 22 08:37:03 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0B000000-0100-0000-0000-000000000000[78918]): Service exited due to SIGKILL | sent by mds[98]
Feb 22 08:37:03 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.10000000-0300-0000-0000-000000000000[78920]): Service exited due to SIGKILL | sent by mds[98]
Feb 22 08:37:03 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.04000000-0500-0000-0000-000000000000[78919]): Service exited due to SIGKILL | sent by mds[98]
Feb 22 08:37:11 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.03000000-0200-0000-0000-000000000000[78925]): Service exited due to SIGKILL | sent by mds[98]
Feb 22 08:37:11 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[84978]): Binary is improperly signed.
Feb 22 08:37:11 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:37:11 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[84977]): Binary is improperly signed.
Feb 22 08:37:11 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:37:21 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[89274]): Binary is improperly signed.
Feb 22 08:37:21 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:37:21 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[89286]): Binary is improperly signed.
Feb 22 08:37:21 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:37:31 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[94316]): Binary is improperly signed.
Feb 22 08:37:31 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:37:31 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[94315]): Binary is improperly signed.
Feb 22 08:37:31 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:37:31 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.0F000000-0600-0000-0000-000000000000[81563]): Service exited due to SIGKILL | sent by mds[98]
Feb 22 08:37:32 dashuangdeMacBook-Pro systemstats[79]: assertion failed: 20D74: systemstats + 399948 [146262DC-951A-39E6-88F2-E8A328A3A263]: 0x0
Feb 22 08:37:32 dashuangdeMacBook-Pro systemstats[79]: assertion failed: 20D74: systemstats + 602280 [146262DC-951A-39E6-88F2-E8A328A3A263]: 0x2
Feb 22 08:37:41 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[9177]): Binary is improperly signed.
Feb 22 08:37:41 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:37:41 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[9178]): Binary is improperly signed.
Feb 22 08:37:41 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:37:43 dashuangdeMacBook-Pro Google Chrome Helper[634]: Libnotify: notify_register_coalesced_registration failed with code 9 on line 2835
Feb 22 08:37:51 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.postgresql[9181]): Binary is improperly signed.
Feb 22 08:37:51 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:37:51 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (homebrew.mxcl.redis[9182]): Binary is improperly signed.
Feb 22 08:37:51 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:37:53 dashuangdeMacBook-Pro com.apple.xpc.launchd[1] (com.apple.mdworker.shared.03000000-0600-0000-0000-000000000000[94450]): Service exited due to SIGKILL | sent by mds[98]

many Service exited due to SIGKILL | sent by mds[98] Service exited due to SIGKILL | sent by mds[98] error

The problem is an update/upgrade of Mac OS itself. Ruby and Python are most likely depending on an library which was already installed on an older version of Mac OS (like for eg 11.1.X). The update breaks the ad-hoc signing which homebrew applies t for eg executables and libraries.

In order to solve this I did the following:

  1. Launch the Console app and have a look in Crash Reports there should be an entry for the app which is tried to be launched. For eg Python.
  2. Within the entry there was the following hint:
Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes:       0x0000000000000032, 0x0000000104ea8000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x2

kernel messages:

VM Regions Near 0x104ea8000:
    __LINKEDIT                  104ea0000-104ea8000    [   32K] r--/rwx SM=COW  /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_hashlib.cpython-38-darwin.so
--> mapped file                 104ea8000-104eac000    [   16K] r--/r-x SM=PRV  Object_id=29cb6af3
    MALLOC_MEDIUM               140000000-140800000    [ 8192K] rw-/rwx SM=PRV  

Application Specific Information:
dyld: in dlopen()
/opt/homebrew/opt/openssl@1.1/lib/libssl.1.1.dylib
  1. Re-install the relevant package with homebrew like for eg brew reinstall openssl or every dependency of the app
    you're trying to run by for eg brew reinstall $(brew deps python) .

I've had a lot of similar problems on a new M1 macbook air with apple silicon:

"zsh: killed git" "zsh: killed python3" etc

The git issue was fixed by uninstalling/reinstalling git under homebrew: brew reinstall git / brew update git.

brew reinstall $(brew deps python) fixed my problems with python3 after trying everything else (just reinstalling python did not work - all deps needed to be updated)... Thank you!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM