chipKIT® Development Platform

Inspired by Arduino™

[solved] libelf.so.1 not found @ Ubuntu 64bit

Created Wed, 08 Jun 2011 10:36:36 +0000 by deepthought-64


deepthought-64

Wed, 08 Jun 2011 10:36:36 +0000

Hey everyone,

I am new to chiipKit. I got my chipKit Max32 today and wanted to try my first sketch, where I came around a strange error when compiling a sketch in mpide.

mpide-0022-chipkit-linux32-20110529/hardware/pic32/compiler/pic32-tools/bin/../pic32mx/bin/gcc/pic32mx/4.5.1/cc1plus: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory

I seems that cc1plus (whatever it is) does not find the libelf.so.1. But however the package libelf1 is installed and the libelf.so.1 is present in /usr/lib/.

I tried compiling and installing the libelf myself but this didn't change anything as well as copying the libelf.so.1-file to the directory where cc1plus is.

Does this has something to do with the fact that I use a 64bit Ubuntu and the mpide is supposed to run in a 32bit environment?

I don't know what to do anymore and hope one of you could help me with this.

Greetings, deepthought


deepthought-64

Wed, 08 Jun 2011 21:35:38 +0000

ok, i figured it out myself. the 32 bit version of libelf.so.1 must be in the /usr/lib32 folder.

just downloaded the .deb, extracted it and copied the needed file.

seems to work now.

greetings


jam123

Tue, 02 Aug 2011 02:48:02 +0000

Thanks bro you saved me. Had the same trouble on openSUSE 64bit.

I had to: sudo zypper install libelf1-32bit

And then to get avrdude to work I had to: sudo zypper install libreadline6-32bit


tbird20d

Tue, 17 Apr 2012 15:44:21 +0000

Apparently you can install 32-bit binaries on ubuntu by using apt-get and adding :i386 to the package name. At least this worked for me on Ubuntu 12.04:

$ sudo apt-get install libelf1:i386

This installed /usr/lib/i386-linux-gnu/libelf.so.1, and allowed my program (in my case, a 32-bit cross-compiler) to run.