Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run jhbuild buildone gudev I get:

Making all in .
  CC     extras/gudev/extras_gudev_libgudev_1_0_la-gudevclient.lo
  CC     extras/gudev/extras_gudev_libgudev_1_0_la-gudevdevice.lo
  CC     extras/gudev/extras_gudev_libgudev_1_0_la-gudevmarshal.lo
  CC     extras/gudev/extras_gudev_libgudev_1_0_la-gudevenumtypes.lo
  CCLD   extras/gudev/libgudev-1.0.la
  GEN    extras/gudev/GUdev-1.0.gir
/opt/gnome/bin/python: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
make[2]: *** [extras/gudev/GUdev-1.0.gir] Error 127
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
*** Error during phase build of gudev: ########## Error running make   *** [1/1]


  • I verified that I do have /opt/gnome/lib/libpython2.5.so.1.0.
  • At time of writing, I'm running latest JHBuild.
  • I used jhbuild bootstrap --ignore-system to avoid any incompatibilities that may arise from my Debian packages. Note that the Python 2.5 so file is built and installed by this command.
share|improve this question

You've installed a shared library in a non-standard location, so it's not found.

If you want the libraries in /opt/gnome/lib to be available automatically to all programs, add this directory to /etc/ld.so.conf, then run ldconfig (as root). If /etc/ld.so.conf contains a line like include /etc/ld.so.conf.d/*.conf, rather than add your entry directly to /etc/ld.so.conf, create a file /etc/ld.so.conf.d/tshepang.conf and add /opt/gnome/lib to that file.

If you only want the libraries in /opt/gnome/lib to be available on request, or don't have root permissions, add that directory to the LD_LIBRARY_PATH environment variable. (It's a colon-separated list, just like PATH, but for libraries instead of executables.)

A third possibility is to tell the /opt/gnome/bin/python binary to look for libraries in /opt/gnome/lib, but you have to do that when you build the executable. Check the JHBuild documentation for a setting like “rpath” or “runtime library path”.

share|improve this answer
JHBuild runs this ./configure --prefix /opt/gnome --libdir '/opt/gnome/lib'. – Tshepang Mar 25 '11 at 19:19
@Tshepang: Try running configure (or JHBuild itself) with LDFLAGS='-rpath /opt/gnome/lib' so that the generated binaries will look for shared libraries in /opt/gnome/lib. The option --libdir is useless here; it controls where libraries that you're building are installed, but --prefix already sets that same value. – Gilles Mar 25 '11 at 19:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.