GNOME Bugzilla – Bug 698214
can't find libpython on certain 64-bit systems
Last modified: 2017-12-28 13:47:38 UTC
On certain 64-bit systems such as Ubuntu, if you build nautilus-python from source, install it and then run Nautilus, it will fail with this error: === (nautilus:16635): Nautilus-Python-WARNING **: g_module_open libpython failed: /usr/lib/libpython2.7.so.1.0: cannot open shared object file: No such file or directory ImportError: could not import gobject (error was: '/usr/lib/x86_64-linux-gnu/libpyglib-gi-2.0-python2.7.so.0: undefined symbol: _Py_ZeroStruct') === nautilus-python is looking for libpython2.7.so in /usr/lib, but on this system it lives in /usr/lib/x86_64-linux-gnu/. The nautilus-python sources have a macro in m4/python.m4 which attempts to detect a 64-bit library directory at build time, but it fails on Ubuntu because it only recognizes such directories if their names end in "lib64". At the very least, it would be nice to check at configure time whether we've correctly guessed the Python library location; we could do this by looking for the libpython shared library there. A more robust solution would be to extend python.m4 to recognize any 64-bit library directory containing "x86_64". I also reported this downstream at https://bugs.launchpad.net/ubuntu/+source/nautilus-python/+bug/1170017
You can work around this by configuring like this: $ ./configure PYTHON_LIB_LOC=/usr/lib/x86_64-linux-gnu
This should be fixed on master in commit bb5eace2e73818318a5f6fb05d571edcba736942.