ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

Talker example on macOS failed.(ROS2)

I just followed through the installation tutorials and installed ROS2 on my mac. (Version 10.12.4).
After type in the following command in terminal:

. ~/ros2_install/ros2-osx/setup.bash

It just gives back an error like this:

dyld: Library not loaded: /usr/local/opt/pcre/lib/libpcre.1.dylib
Referenced from: /Users/lander14/ros2_install/ros2-osx/lib/libPocoFoundation.46.dylib
Reason: image not found
Abort trap: 6

Can someone help me please?

Would you mind giving me a few more details about your installation? Did you install from source or binary?

Then further, can you verify that you installed poco and pcre correctly from homebrew?
On my machine this looks similar to:

 ➭ brew info poco pcre
poco: stable 1.7.8 (bottled), HEAD
C++ class libraries for building network and internet-based applications
/usr/local/Cellar/poco/1.7.8 (784 files, 11.2MB)
  Poured from bottle on 2017-03-08 at 14:15:26
==> Dependencies
Build: cmake ✔
Required: openssl ✔
==> Options
	Build static libraries (instead of shared)
	Install HEAD version

pcre: stable 8.40 (bottled), HEAD
Perl compatible regular expressions library
/usr/local/Cellar/pcre/8.39 (203 files, 5.4MB) *
  Poured from bottle on 2017-02-17 at 09:07:36
1 Like

I installed the Binary packages. And because I’m very new to ROS2, I followed strictly as the website told me to( ).
During the process, I didn’t encounter anything as poco or pcre.

@Kloping can you try running brew install poco to see if that resolves your issue. If so I’ll update the install instructions for OS X that you linked to above.


Actually, my previous comment doesn’t make anysense. Please ignore it.

Actually it looks like you’d need to do brew install pcre. If that command resolves your issue we’ll put that in the instructions. You should not, however, need to have poco installed from Homebrew for the binary to work.

Sorry for the confusion.

1 Like

Yes, it worked after installed pcre
Thank you very much!

Cool, I updated the wiki pages.

For anyone interested, this seems to be an optional dependency of poco which it will pick up if installed from Homebrew. I was getting installed as a dependency of cppchecker which we have in our “development” or “from source” instruction, but not in our binary install instruction.

@Kloping thanks for pointing it out for us.