1

我相信“brew update”已经破坏了我的 /bin/zipalign - 因为在那之后它不再运行了。该盒子位于远程位置(10 小时时区差异,在服务器盒子中,因此我无法物理访问推送 cmd+r)。我可以 sudo 但这并不能解决问题。

我该如何解决这个问题?

$ /bin/zipalign
dyld: warning, LC_RPATH @loader_path/../lib in /bin/zipalign being ignored in restricted program because of @loader_path
dyld: warning, LC_RPATH @loader_path/lib in /bin/zipalign being ignored in restricted program because of @loader_path
dyld: Library not loaded: @rpath/libc++.dylib
  Referenced from: /bin/zipalign
  Reason: image not found
Trace/BPT trap: 5

$ /Users/myuser/Library/Android/sdk/build-tools/23.0.1/zipalign
Zip alignment utility
Copyright (C) 2009 The Android Open Source Project
...
* So that works; I would like to have the that in /bin/zipalign; I though creating a symlink.

$ sudo rm -rf /bin/zipalign
rm: /bin/zipalign: Operation not permitted

$ otool -L /bin/zipalign
/bin/zipalign:
    @rpath/libc++.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

$ sudo install_name_tool -change @rpath/libc++.dylib /share/android/build-tools/23.0.1/lib/libc++.dylib /bin/zipalign
error: 
install_name_tool: can't open input file: /bin/zipalign for writing (Operation not permitted)

$ sudo csrutil disable
csrutil: failed to modify system integrity configuration. This tool needs to be executed from the Recovery OS.

这是一个詹金斯奴隶,访问:ssh only,可以sudo,不能触摸真正的键盘,我该如何解决?

4

1 回答 1

1

原来的解决方案是:将文件复制到 /usr/bin 并确保它优先于 /bin,然后拙劣的应用程序将不会运行。

于 2016-09-23T08:26:58.753 回答