2

我正在尝试将我的本地 IP 地址添加到xhost并收到以下错误:

dyld: Library not loaded: /opt/X11/lib/libXmuu.1.dylib
  Referenced from: /usr/bin/xhost
  Reason: no suitable image found.  Did find:
    /opt/X11/lib/libXmuu.1.dylib: code signature in (/opt/X11/lib/libXmuu.1.dylib) not valid for use in process using Library Validation: mapping process is a platform binary, but mapped file is not
    /opt/X11/lib/libXmuu.1.dylib: stat() failed with errno=1
Abort trap: 6

即使只是xhost从命令行调用也会发生错误。但是,我似乎已安装并在正确的位置。which xhost结果的输出/usr/bin/xhost

我正在全新安装 XQuartz 和 CommandLineTools。我尝试过降级 XQuartz,注销并重新登录,以及在每次全新安装后重新启动。仍然没有运气。

这似乎是一个记录在案的问题,尽管我找不到任何修复的答案。

操作系统:Macbook Pro 上的 OSX 10.14.5,2018

XQuartz 版本:2.7.11

编辑

输出codesign -vvv -d /usr/bin/xhost

Executable=/usr/bin/xhost
Identifier=xhost
Format=Mach-O universal (i386 x86_64)
CodeDirectory v=20200 size=261 flags=0x0(none) hashes=4+2 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha1=ddd40d822185d02bc484aae27ab8a2a832490c9f
CandidateCDHash sha256=5c76bf6e89fc30926f3d38559f9cf813bcf63349
Hash choices=sha1,sha256
CDHash=5c76bf6e89fc30926f3d38559f9cf813bcf63349
Signature size=8928
Authority=Developer ID Application: Apple Inc. - XQuartz (NA574AWV7E)
Authority=Developer ID Certification Authority
Authority=Apple Root CA
Timestamp=Oct 7, 2016 at 1:26:16 PM
Info.plist=not bound
TeamIdentifier=NA574AWV7E
Sealed Resources=none
Internal requirements count=1 size=168
4

1 回答 1

0

对我来说,有效的是为 xhost 指定正确的路径:

/usr/X11/bin/xhost + 127.0.0.1

(苹果系统)

于 2021-03-17T23:16:39.863 回答