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 try to compile Binutils, Glibc and Zlib using chroot on my LFS system, I get this error:

ar: error while loading shared libraries: libbfd-2.22.so: cannot open shared object file: No such file or directory

I compiled Binutils before without using chroot, the files libbfd.a, libbfd.so, libbfd-2.22.so and libbfd.la exist both in /tools/lib/ and /usr/lib/

I don't know where the compiler is searching for it. How to continue compilation?

share|improve this question
In Ubuntu current version, I need symlink: sudo ln -s /usr/lib/libbfd-2.24.51-system.20140727.so /usr/lib/libbfd-2.24-system.so – shakaran Aug 1 '14 at 10:38

Your Answer


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

Browse other questions tagged or ask your own question.