Recently the XQuartz cracked after I open it from the Utilities folder. And I try to install it through different methods like the pkg and "brew cask install xquartz". However, it cannot work by each method.
Now I open it from the Terminals, it can open. However, it cannot open display automatically.
After I install the Grace, the problem I met as follows.
$ xmgrace
Can't open display
Failed initializing GUI, exiting
Then I tried to use "echo $DISPLAY" to show the display setup, it gives nothing.
$ echo $DISPLAY
I tried to open the Xquartz program and use another program which needs the graphics platform, it gives the error report as follows:
$ kfmf
dyld: Library not loaded: /opt/X11/lib/libxcb.1.dylib
Referenced from: /usr/bin/xwininfo
Reason: no suitable image found. Did find:
/opt/X11/lib/libxcb.1.dylib: code signature in (/opt/X11/lib/libxcb.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/libxcb.1.dylib: stat() failed with errno=1
Xinfo: Subscript out of range.
I want to know how to solve this problem. Please give me some advice. Thanks a lot.
This problem can be fixed by reinstall the OS system. If you have the same problem, you can use this method. And I find that the "xinfowin" program in /usr/bin folder is installed repeatedly. The old one cannot run. Then I decided to reinstall my OS system.