How can I install
libdwarf.so on Ubuntu? I get this error while running an executable file.
error while loading shared libraries: libdwarf.so: cannot open shared object file: No such file or directory.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
So after too many hours finally it's been solved. It goes like this:
Extract the archive and in a new terminal type:
cd dwarf-2013-02-07/libdwarf ./configure --enable-shared make -j$(nproc)
If you need a 32 bit library (as in my case), just open the
MakeFile and add
CFLAGS = -m32 $(PREINCS) -g -O2 $(INCLUDES) $(dwfpic) $(POSTINCS)
At the end, just copy the
I suspect this wasn't true when the question was asked, but in 2018:
sudo apt-get install libelf-dev libdwarf-dev
You might also be interested in https://github.com/aclements/libelfin.