Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error while loading shared libraries: libg2o_types_slam3d.so #595

Open
AaboutL opened this issue Aug 15, 2022 · 3 comments
Open

error while loading shared libraries: libg2o_types_slam3d.so #595

AaboutL opened this issue Aug 15, 2022 · 3 comments
Labels

Comments

@AaboutL
Copy link

AaboutL commented Aug 15, 2022

I set my CMakeLists.txt like below:
image
Using

message("slam3d: " ${G2O_TYPES_SLAM3D})

I can get

slam3d: /home/**/3rdparty/g2o/lib/libg2o_types_slam3d.so

But when execute my sample code, I get the output like below:

/tmp/tmp.Q6L6jGxD1s/cmake-build-debug-remotehostslam/main: error while loading shared libraries: libg2o_types_slam3d.so: cannot open shared object file: No such file or directory

I have tried https://github.com/RainerKuemmerle/g2o/issues/480#issuecomment-761876244(sudo ldconfig), but it does not work.
How can I solve this problem?

@AaboutL
Copy link
Author

AaboutL commented Aug 16, 2022

I found a stupid solution. Since my g2o installatoin dir is not default, I write my g2o lib dir into /etc/ld.so.conf and run "ldconfig".
But I still don't know why the "core" library can work while the "types slam3d" can't. They are both found and set by cmake.

@RainerKuemmerle
Copy link
Owner

You can also use the LD_LIBRARY_PATH environment variable to specify where to look for libs.
Why core library is not a problem is not so clear to me.

Copy link

github-actions bot commented Jan 2, 2025

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants