IOES-Lab / ROS2_Jazzy_MacOS_Native_AppleSilicon

14 stars 0 forks source link

fail to start gazebo using "gz sim" #1

Open butteria opened 1 month ago

butteria commented 1 month ago
(.ros2_venv) dingheng@192 ~ % gz sim shapes.sdf -s
Library error for [/Users/dingheng/gz_harmonic/install/lib/libgz-sim8-gz.8.6.0.dylib]: dlopen(/Users/dingheng/gz_harmonic/install/lib/libgz-sim8-gz.8.6.0.dylib, 0x0009): Library not loaded: libgz-sim8-gui.8.dylib
  Referenced from: <A3C68D61-8AA9-3964-BBC4-89B7D32F666C> /Users/dingheng/gz_harmonic/install/lib/libgz-sim8-gz.8.6.0.dylib
  Reason: tried: 'libgz-sim8-gui.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibgz-sim8-gui.8.dylib' (no such file), 'libgz-sim8-gui.8.dylib' (no such file), '/Users/dingheng/libgz-sim8-gui.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/dingheng/libgz-sim8-gui.8.dylib' (no such file), '/Users/dingheng/libgz-sim8-gui.8.dylib' (no such file)

If this script was executed with /usr/bin/ruby, this error may be caused by
macOS System Integrity Protection. One workaround is to use a different
version of ruby, for example:
    brew install ruby
and add the following line to your shell profile:
    export PATH=/usr/local/opt/ruby/bin:$PATH
If you are using a colcon workspace, please ensure that the setup script
has properly set the DYLD_LIBRARY_PATH environment variables.

l use m2 MacBook and Sonoma 14.6. l follow the instruction above using another ruby, and add ruby path to .zshrc. but it can't be fixed. how can I solve it?

woensug-choi commented 1 month ago

I suggest reinstalling everything. I have not seen such error.

butteria commented 1 month ago

thanks for your reply. l searched it may caused by Apple SIP mechanism. need i disable it?

woensug-choi commented 1 month ago

You may bump into SIP. But the installation method here doesn't require it.

butteria commented 1 month ago
(.ros2_venv) dingheng@192 ~ % gz sim shapes.sdf -s
Library error for [/Users/dingheng/gz_harmonic/install/lib/libgz-sim8-gz.8.6.0.dylib]: can't load /Users/dingheng/gz_harmonic/install/lib/libgz-sim8-gz.8.6.0.dylib

If this script was executed with /usr/bin/ruby, this error may be caused by
macOS System Integrity Protection. One workaround is to use a different
version of ruby, for example:
    brew install ruby
and add the following line to your shell profile:
    export PATH=/usr/local/opt/ruby/bin:$PATH
If you are using a colcon workspace, please ensure that the setup script
has properly set the DYLD_LIBRARY_PATH environment variables.

l use your script with clean install option. l get this error again. if there is no performance loss, I can install the binary packages first.

woensug-choi commented 1 day ago

@butteria did you try brew install ruby? I am not sure why it doesn't work for you. But the error msg says to install ruby