Ask Your Question
0

rosrun on mac error: dyld: Library not loaded: librospack.dylib

asked 2017-05-23 10:34:38 -0600

westeast gravatar image

I have build ros on mac ,and I the cmd rescore run normally. but rosrun can`t work. for example: I have google this problem https://github.com/mikepurvis/ros-ins... other people meet the same problem

[#2#zouxidong@23:12:08 ~]$ rosrun rviz rviz
dyld: Library not loaded: librospack.dylib
  Referenced from: /Users/baidu/ros_catkin_ws/install_isolated/bin/rospack
  Reason: image not found
find: ftsopen: No such file or directory
[rosrun] Couldn't find executable named rviz below
find: ftsopen: No such file or directory
[#3#zouxidong@23:12:21 ~]$ rosrun turtlesim turtlesim_node
dyld: Library not loaded: librospack.dylib
  Referenced from: /Users/baidu/ros_catkin_ws/install_isolated/bin/rospack
  Reason: image not found
find: ftsopen: No such file or directory
[rosrun] Couldn't find executable named turtlesim_node below
find: ftsopen: No such file or directory
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-05-23 10:56:03 -0600

westeast gravatar image

I solved this problem :

vim /Users/baidu/ros_catkin_ws/install_isolated/bin/rosrun add the following line

DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Users/xxx/ros_catkin_ws/install_isolated/lib

edit flag offensive delete link more
0

answered 2017-07-17 16:41:39 -0600

lubiluk gravatar image

On macOS Sierra, due to SIP, DYLD_LIBRARY_PATH has no effect. Then, the way to fix this problem is to add the following options to catkin_make_isolated:

-DCMAKE_MACOSX_RPATH=ON 
-DCMAKE_INSTALL_RPATH="[path_to_your_workspace]/install_isolated/lib"
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-05-23 10:34:38 -0600

Seen: 499 times

Last updated: Jul 17 '17