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 loading libboost on Ubuntu 16.10 #427

Closed
ageron opened this issue Dec 13, 2016 · 5 comments
Closed

Error loading libboost on Ubuntu 16.10 #427

ageron opened this issue Dec 13, 2016 · 5 comments

Comments

@ageron
Copy link

ageron commented Dec 13, 2016

Hi,

I followed the installation instructions for Ubuntu (I'm running Ubuntu 16.10), but I ran into the following error:

$ python run_mission.py 
Traceback (most recent call last):
  File "run_mission.py", line 20, in <module>
    import MalmoPython
ImportError: libboost_python.so.1.61.0: cannot open shared object file: No such file or directory

It turns out that the name of the .so file on Ubuntu 16.10 is libboost_python-py27.so.1.61.0:

$ cd /usr/lib/x86_64-linux-gnu
$ ls -l libboost_python*
lrwxrwxrwx 1 root root     22 août   3 21:10 libboost_python.a -> libboost_python-py27.a
-rw-r--r-- 1 root root 655814 août   3 21:10 libboost_python-py27.a
lrwxrwxrwx 1 root root     30 août   3 21:10 libboost_python-py27.so -> libboost_python-py27.so.1.61.0
-rw-r--r-- 1 root root 297840 août   3 21:10 libboost_python-py27.so.1.61.0
-rw-r--r-- 1 root root 648116 août   3 21:10 libboost_python-py35.a
lrwxrwxrwx 1 root root     30 août   3 21:10 libboost_python-py35.so -> libboost_python-py35.so.1.61.0
-rw-r--r-- 1 root root 293712 août   3 21:10 libboost_python-py35.so.1.61.0
lrwxrwxrwx 1 root root     23 août   3 21:10 libboost_python.so -> libboost_python-py27.so

A simple workaround is to create a symbolic link with the right name:

$ sudo su
$ cd /usr/lib/x86_64-linux-gnu
$ ln -s libboost_python-py27.so.1.61.0 libboost_python.so.1.61.0`

And then everything works fine! Thanks for this awesome project. 👍

@DaveyBiggers
Copy link
Member

Thanks for pointing this out, and for sharing a solution.
We've had a few problems with dynamically linking boost - see #392 - nice to see that your issue, at least, had a simple workaround!

@moobb
Copy link

moobb commented Dec 18, 2016

Many thanks, it was very helpful. I had the same problem (on elementary linux), but once following the solution I got the following message:

File "run_mission.py", line 20, in
import MalmoPython
ImportError: libboost_date_time.so.1.61.0: cannot open shared object file: No such file or directory

ls-l gives me the following:
ls -l libboost_date_time*
-rw-r--r-- 1 root root 167000 Jun 14 2016 libboost_date_time.a
lrwxrwxrwx 1 root root 28 Jun 14 2016 libboost_date_time.so -> libboost_date_time.so.1.58.0
-rw-r--r-- 1 root root 68088 Jun 14 2016 libboost_date_time.so.1.58.0

so no 1.61 version. tried similar solution:
ls -s libboost_date_time.so.1.61.0 libboost_date_time.so.1.58.0
but got
ls: cannot access 'libboost_date_time.so.1.61.0': No such file or directory
Am I doing something wrong? Many thanks

@moobb
Copy link

moobb commented Dec 18, 2016

Installing boost in my python 2.7 anaconda environment solved that. Although now I am stuck at
Malmo-0.18.0-Linux-Ubuntu-16.04-64bit/Python_Examples/MalmoPython.so: undefined symbol: _ZNK5boost15program_options22error_with_option_name23substitute_placeholdersERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

@moobb
Copy link

moobb commented Dec 18, 2016

I am unsure I am in the right track now. Guess I don't need to install it in Anaconda, as when installing dependencies for malmo I had already installed libboost. Could it be a confusion about which python is being used? If I run
ls /usr/lib/x86_64-linux-gnu/libboost*.so
I can see ibboost_date_time.so is installed

/usr/lib/x86_64-linux-gnu/libboost_atomic.so /usr/lib/x86_64-linux-gnu/libboost_mpi_python-py35.so
/usr/lib/x86_64-linux-gnu/libboost_chrono.so /usr/lib/x86_64-linux-gnu/libboost_mpi_python.so
/usr/lib/x86_64-linux-gnu/libboost_context.so /usr/lib/x86_64-linux-gnu/libboost_mpi.so
/usr/lib/x86_64-linux-gnu/libboost_coroutine.so /usr/lib/x86_64-linux-gnu/libboost_prg_exec_monitor.so
/usr/lib/x86_64-linux-gnu/libboost_date_time.so /usr/lib/x86_64-linux-gnu/libboost_program_options.so
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so /usr/lib/x86_64-linux-gnu/libboost_python-py27.so
/usr/lib/x86_64-linux-gnu/libboost_graph_parallel.so /usr/lib/x86_64-linux-gnu/libboost_python-py35.so
/usr/lib/x86_64-linux-gnu/libboost_graph.so /usr/lib/x86_64-linux-gnu/libboost_python.so
/usr/lib/x86_64-linux-gnu/libboost_iostreams.so /usr/lib/x86_64-linux-gnu/libboost_random.so
/usr/lib/x86_64-linux-gnu/libboost_locale.so /usr/lib/x86_64-linux-gnu/libboost_regex.so
/usr/lib/x86_64-linux-gnu/libboost_log_setup.so /usr/lib/x86_64-linux-gnu/libboost_serialization.so
/usr/lib/x86_64-linux-gnu/libboost_log.so /usr/lib/x86_64-linux-gnu/libboost_signals.so
/usr/lib/x86_64-linux-gnu/libboost_math_c99f.so /usr/lib/x86_64-linux-gnu/libboost_system.so
/usr/lib/x86_64-linux-gnu/libboost_math_c99l.so /usr/lib/x86_64-linux-gnu/libboost_thread.so
/usr/lib/x86_64-linux-gnu/libboost_math_c99.so /usr/lib/x86_64-linux-gnu/libboost_timer.so
/usr/lib/x86_64-linux-gnu/libboost_math_tr1f.so /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so
/usr/lib/x86_64-linux-gnu/libboost_math_tr1l.so /usr/lib/x86_64-linux-gnu/libboost_wave.so
/usr/lib/x86_64-linux-gnu/libboost_math_tr1.so /usr/lib/x86_64-linux-gnu/libboost_wserialization.so
/usr/lib/x86_64-linux-gnu/libboost_mpi_python-py27.so

@DaveyBiggers
Copy link
Member

Am closing this, assuming that these problems went away when we moved to statically linking boost (#392).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants