Update: Eagle 6.2.0 has been released. The issue remains though and this updated guide still applies.

Minor update: Changed instructions to download libpng source code via FTP instead of Git. This results in one less needed tool and a decreased download size.

Update: This guide has been revised to work on both 32-bit and 64-bit systems. Previously it only worked on 32-bit systems. Please write a comment if you have any questions or find something that does not work.

Update: Eagle 6.1.0 has been released! This guide still applies to both 6.0.0 and 6.1.0, and has been updated with the following change: The string “6.0″ has been replaced by “6.1″ in the name of the installer and in the installation location. Apart from that everything is the same.

CadSoft recently released version 6 of its PCB layout program Eagle. So, you wanted to use it in Ubuntu? The eagle package in Ubuntu is only version 5.11.0 as of Oneiric, so you downloaded the new version from the official website? You ran the installer and got this error?

error while loading shared libraries: libpng14.so.14: cannot open shared object file: No such file or directory

It turns out that Eagle needs newer versions of some libraries than are available in the Ubuntu repos. This post will show you how to get hold of these specific version and how set them up with Eagle.

No super user access is needed (besides from installing build tools) in the approach I chose. The special versions of the libraries are only used Eagle and will never cause trouble for any other applications you have installed, because the system directories are never touched.

Overview

My approach was to download the source for all libraries Eagle needs, compile them (as 32-bit, since that’s what Eagle requires), install them in a local directory, and make a small script to launch Eagle. The libraries Eagle needs are:

  • libpng 1.4.x (provides libpng14.so)
  • OpenSSL 1.0.0 (provides libssl.so.1.0.0 and libcrypto.so.1.0.0)
  • libjpeg v8 (provides libjpeg.so.8)

Preparations

In my setup I put all relevant files the directory /home/raek/.eagle . To follow my steps you need to create your own directory and subsitute its path it for /home/raek/.eagle in all the following steps.

mkdir /home/raek/.eagle
cd /home/raek/.eagle

I had to install some tools and libraries were needed in the process. This depended on whether I was on my 32-bit or 64-bit machine. In the 32-bit scenario they were:

sudo apt-get install build-essential perl
sudo apt-get install zlib1g zlib1g-dev

And in the 64-bit they were:

sudo apt-get install build-essential perl gcc-multilib
sudo apt-get install ia32-libs lib32z1 lib32z1-dev

Downloading, building, and installing libraries locally

I went about to install a typical library like this:

  1. Download the source code and unpack it.
  2. Configure the library with suitable options.
  3. Build the library.
  4. Test the library.
  5. Install the library.
  6. Verify that the expected .so file shows up in
    /home/raek/.eagle/usr/lib and that is 32-bit.

Of the configure options, the --prefix=/home/raek/.eagle/usr option is important since it tells the build system where to put the files when make install is run. It allowed me to put the result my own usr directory rather than in the system-wide /usr or /usr/local.

The CFLAGS=-m32 option (in its various forms) is also needed to force the libraries to be built in 32-bit form.

I verified that the resulting .so files were in the right place and 32-bit with the file -L command. If it was 32-bit the command came back with “ELF 32-bit”, if was 64-bit it came back with “ELF 64-bit”, and if the file didn’t exist at all it came back with “No such file or directory”.

libpng 1.4.x

I downloaded the libpng14 source code and configured, built, tested, installed and verified it:

wget http://www.sourceforge.net/projects/libpng/files/libpng14/older-releases/1.4.11/libpng-1.4.11.tar.gz
tar zxf libpng-1.4.11.tar.gz
cd libpng-1.4.11
./configure --prefix=/home/raek/.eagle/usr CFLAGS=-m32
make check
make install
cd ..
file -L usr/lib/libpng14.so

libssl 1.0.0

The libssl install procedure was very similar, but here the shared option was needed to generate .so files:

wget http://www.openssl.org/source/openssl-1.0.0f.tar.gz
tar zxf openssl-1.0.0f.tar.gz
cd openssl-1.0.0f
./Configure shared --prefix=/home/raek/.eagle/usr linux-generic32 -m32
make
make test
make install
cd ..
file -L usr/lib/libssl.so.1.0.0
file -L usr/lib/libcrypto.so.1.0.0

libjpeg v8

No surprises here:

wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz
tar zxf jpegsrc.v8c.tar.gz
cd jpeg-8c
./configure --prefix=/home/raek/.eagle/usr CFLAGS=-m32
make
make test
make install
cd ..
file -L usr/lib/libjpeg.so.8

Installing Eagle

I now had all the library files I needed in my /home/raek/.eagle/usr/lib directory and proceeded with downloading and installing Eagle itself. I told the shared library loader to always look for libraries in this directory first by setting the LD_LIBRARY_PATH environment variable in my shell session.

I could then run the Eagle installer and chose to install Eagle in /home/raek/.eagle/eagle-6.2.0 . After that I could start eagle by running the binary found in eagle-6.2.0/bin/eagle.

wget ftp://ftp.cadsoft.de/eagle/program/6.2/eagle-lin-6.2.0.run
export LD_LIBRARY_PATH=/home/raek/.eagle/usr/lib
sh eagle-lin-6.2.0.run
/home/raek/.eagle/eagle-6.2.0/bin/eagle

Making a Launch Script

Starting eagle worked fine, but I din’t want to have to run the export command in a terminal each time I were going to start Eagle. Therefore I made a small script with the following contents:

#!/bin/sh
export LD_LIBRARY_PATH=/home/raek/.eagle/usr/lib
/home/raek/.eagle/eagle-6.2.0/bin/eagle

After I wrote the script I made it executable and added a symlink to it in my .bin directory, which I have on my PATH.

nano run_eagle.sh
chmod a+x run_eagle.sh
cd /home/raek/.bin
ln -s /home/raek/.eagle/run_eagle.sh /home/raek/.bin/eagle

I can now start Eagle by just running eagle! If I want to uninstall Eagle some time in the future, all I need to do is to delete /home/raek/.eagle and /home/raek/.bin/eagle and both Eagle and the special version libraries will be gone.

And that’s it! Please drop a comment below if this was useful for you (or if if something turned out to not work)!

55 Responses to “Running Eagle 6.0/6.1/6.2 in 32/64-bit Ubuntu GNU/Linux”

  1. Ross Williamson Says:

    Thanks for the info – unfortunately this doesn’t work if your on 64-bit debian – you get a wrong ELF class when running the installer.

  2. kzoli Says:

    Hi,
    I have done what you wrote and it went well up to the point when I run the Eagle installer script.
    Then I got this error message:
    /tmp/eagle-setup.15423/eagle-6.1.0/bin/eagle: error while loading shared libraries: libssl.so.1.0.0: wrong ELF class: ELFCLASS64
    For me it seems to be a conflict between 32/64 bit (I run 64 bit Ubuntu).
    Do you have an idea how I could cure it?

  3. Don Pitchford Says:

    Hi,

    Followed your very clear instructions (thanks!) but when the time comes to run install of eagle, I receive the following error:

    /tmp/eagle-setup.7225/eagle-6.1.0/bin/eagle: error while loading shared libraries: libpng14.so.14: wrong ELF class: ELFCLASS64

    I am running Ubuntu 10.04 64bit.

    Thoughts?

  4. Gustavo Says:

    Excellent, excellent, excellent! Great post, very helpful!

    Thanks a lot!!!

  5. raek Says:

    Ross, kzoli, Don, Gustavo: Thanks for the feedback!

    I’m sorry that your comments were stuck for some days waiting for my approval. Now when comments by human beings have started to appear here I simply have to check in on them more often. :-)

    Yes, it’s true that this didn’t work at all for 64-bit systems. (I had only tested these steps on my own 32-bit install of Ubuntu.)

    I have now updated this post and verified that these new instructions works both on 32-bit and on 64-bit systems. Please do drop a comment if you find anything that can be improved!

  6. Robbie Powell Says:

    These instructions worked great for me…I’m running linux Mint Debian Edition 12…took a little bit of fiddling with the run script, but the compiling of the special libraries went flawlessly, and I’m glad I don’t have to clutter my actual /lib and /usr/local folders with non-standard libraries.

    Thanks much Raek!

  7. Saif Says:

    Hi raek,

    My system Ubuntu 10.04.3 LTS, 32bit.

    Your method worked flawlessly !!

    Thank you very much.

  8. Saif Says:

    Regarding git installation, forget to mention that “apt-get install git” did not worked for me, but after a few google search tried “apt-get install git-core” and it worked.

  9. Jens Says:

    Great
    Just tested on Ubuntu 11.10 64bit. Worked great for me.

  10. ePoxi Says:

    Ubuntu 10.04 over here.
    Worked fine, but i need to run the eagle progam from its subdirectory.

    If not appears the following message:

    XYZ@ABC:~$ eagle
    /home/lcampa/.eagle/eagle-6.1.0/bin/eagle: error while loading shared libraries: libpng14.so.14: cannot open shared object file: No such file or directory

  11. Leon Says:

    Great, thank you.

    This is one of the few tut’s I’ve found that does what it should do – 1st time ’round, is easy to follow and implement. Of course there are tweaks to personalize but it was a pleasure getting it to work and learning from it :) .

    Job very well done, keep it up.

    Leon

  12. Dave L. Says:

    Awesome! Works great. Thanks so much.

  13. John Says:

    Hi.

    I have installed my Eagle 6.1.0 on Linux Mint 12 64-bit doing the above recomendation. But it didn`t starts.

  14. John Says:

    Thank you.
    The matter was I had previose version of Eagle installed.
    And now everything is ok.

  15. Romilly Cocking Says:

    Thanks for a clear, detailed explanation.

    This worked perfectly, apart from the line which tries to install git; as noted above, the required package is called git-core, not git.

  16. Tomas Says:

    Thank you!

    Install works also for Eagle 6.2.0 on Ubuntu 10.04 for me.
    I think you can include 6.2.0 in the title.

  17. raek Says:

    From what I can tell, the git package was called git-core in older versions of Ubuntu (10.04 Lucid Lynx and earlier).

    Instead of adding instructions for this I decided to remove the dependency on Git altogether. Only a specific snapshot of the code is needed here, so it is unnecessary to clone the whole repo.

  18. raek Says:

    Tomas: Done! Thanks. I verified it myself just to be sure and updated the instructions.

  19. sardonyx Says:

    Installed on Ubuntu 11.04 32bit. Worked great!

  20. Bharat Balegere Says:

    Excellent tutorial.
    Why don’t you change the commands containing your username to $USER? Then your commands become generic.Right now they are specific to your username.
    This way it is easier to follow the instructions.Otherwise we have to change the username before executing the commands.

  21. hurricanet Says:

    Very very good explanation! and it worked!

    Thanks a lot!

    Greetings

  22. Przemo Says:

    You have missed “tar xzv” in “libpng 1.4.x”
    section. All the rest was EXCELENT job.
    I’ve finaly have eagle 6.2 working on Ubuntu 12.04 LST
    Amd64 platform on my lenovo W500. Great job!

  23. raek Says:

    @Przemo: Oops… Fixed now. Thanks!

  24. Przemo Says:

    You have missed “make” step in “libpng 1.4.x”
    section :-) . Replacing “/home/raek” into $HOME would be nice too (for souch lazy as me :-) ). Best regards.

  25. Ken Scharf Says:

    I followed your directions to build the required libraries in my ~/eagle/usr/lib directory (which got created during the build process). I then copied the libraries to the system lib32 directory as follows:
    cd ~/eagle/usr/lib
    sudo cp lib* /usr/lib32

    I was then able to run and install eagle without having to set any library prefixes or paths.

  26. Running Eagle CAD 6.2 on Ubuntu 12.04 | Kai Christian Bader Says:

    [...] I found a detailed post at raek’s blog which covers older Ubuntu versions. Great parts of the following instruction were taken from this [...]

  27. Sami Ropponen Says:

    I followed your instructions on 64-bit Ubuntu 12.04 and it works perfectly! Thanks a lot!

  28. Paul Frederick Says:

    Great instructions!

    This is what I did for a global install on Debian Squeeze:

    tar xzvf jpegsrc.v8d.tar.gz

    cd jpeg-8d

    ./configure –prefix=/opt

    make

    make check

    sudo make install

    cd ..

    tar xjvf libpng-1.4.11.tar.bz2

    cd libpng-1.4.11

    ./configure –prefix=/opt

    make

    make check

    sudo make install

    cd ..

    tar xzvf openssl-1.0.1c.tar.gz

    cd openssl-1.0.1c

    ./config –prefix=/opt shared

    make

    make test

    sudo make install

    export LD_LIBRARY_PATH=/opt/lib

    sh eagle-lin-6.2.0.run

    It installed to:
    /opt/eagle-6.2.0

    /opt/eagle-6.2.0/bin/eagle

    Shell script to run Eagle (eagle.txt) :

    #!/bin/sh
    export LD_LIBRARY_PATH=/opt/lib
    /opt/eagle-6.2.0/bin/eagle

    root@buck:~# cp eagle.txt /usr/local/bin/eagle

    root@buck:~# chmod +x /usr/local/bin/eagle

    Worked great! Thanks a lot.

  29. Paul Frederick Says:

    Update:

    This script actually opens a file as a command line parameter:

    #!/bin/bash
    export LD_LIBRARY_PATH=/opt/lib
    /opt/eagle-6.2.0/bin/eagle $1

    I like how it works better.

  30. markus Says:

    Thank you very much!

  31. nqdinhddt Says:

    thanks, thanks, thanks. Totally awesome.

  32. ethanb Says:

    After Kubuntu did a major upgrade to Precise Pangolin (12.04) suddenly eagle quit working with the error “error while loading shared libraries: libXrandr.so.2″. Turns out that ldd showed that another library was missing as well: libXcursor.so.1.

    I solved that by going to
    http://packages.ubuntu.com
    In the Search package directories I put in libxrandr, made sure the Distribution was “precise” and pressed “Search”.
    From the three packages I chose Package libxrandr2 for amd64 and i386 (not dev or dbg).
    On the next page in the Download box I chose i386.
    On the next page I chose a “good” mirror and downloaded the package.
    Then I went to where the package was downloaded and typed in
    sudo dpkg –unpack libxrandr2_1.3.2-2_i386.deb

    I then repeated the procedure for the missing libxcursor library and now it all works again.

    It would sure be nice if eagle would make the installation get all required packages or include missing packages.

    Thanks for your instructions!

  33. nfraval Says:

    You are the boss !
    Many thanks

    Nicolas

  34. Kyle Says:

    Worked perfectly for me with Kubuntu 12.04 32bit, thanks!

  35. Ran Talbott Says:

    Thanks for the very helpful howto.

    If you change your launch script to:

    /home/ran/.eagle/eagle-6.2.0/bin/eagle $*

    it will allow you to enter a command like “eagle blahblah.sch” to quickly view a downloaded schematic or board file that’s not in your eagle projects directory tree.

  36. geektopia Says:

    Ubuntu 12.04 64-bit, fresh install – these instructions worked perfectly, many thanks

  37. Sneeuw Says:

    Works like a charm on 10.04
    In building libpng I had to omit the CFLAGS=-m32 to get rid of gcc errors. Apart from that it was pretty smooth.
    Thanks very much!

  38. SR-71 Says:

    Works fine on Ubuntu 11.10.
    Many thanks to take time to develop the procedure.

  39. bianghouse Says:

    Great Great Post!!!
    Works fine on Ubuntu 11.10

  40. PO8 Says:

    Note that on current Debian 64-bit with multiarch set up properly (dpkg –add-architecture i386), you can apt-get install both libssl1.0.0:i386 and libjpeg8:i386 . You still need to build libpng14 from source. It is now at version 1.14.12, so the URL needs to change slightly. ia32-libs currently seems to not install properly, but is not needed in any case.

    Thanks much for your excellent help!

  41. Joan Says:

    Great!
    I was looking for that! works like a charm in 64 bit!

  42. Jenni Says:

    Thanks for this! I’m failing at the first step though! I can’t install lib32z1 or lib32z1-dev – it says unable to locate package.

  43. Jenni Says:

    Ooops, ignore me – I got my l’s and 1′s mixed up! Thanks – this was really helpful!

  44. Steve Ace Says:

    Great work!
    But the file libpng-1.4.11.tar.gz is not avaiable at simplesysetms.org!
    instead of
    >> wget ftp://ftp.simplesystems.org/pub/png/src/libpng-1.4.11.tar.gz <> wget http://www.sourceforge.net/projects/libpng/files/libpng14/older-releases/1.4.11/libpng-1.4.11.tar.gz <<

  45. raek Says:

    Steve: Thanks for catching this! Yes, it seems like the 1.4.11 release has been removed from the simplesystems.org mirror. I updated the instructions.

  46. Brad Says:

    Thanks bro! Very useful, worked like a charm. I’ve done this before, but couldn’t remember how and this set of instructions was very fast and easy.

    I put the LD_LIBRARY_PATH in my .bashrc, but now when I run a lot of programs (particularly, anything Python related), I get the following errors:

    python: /home/brad/programs/eaglelibs/lib/libcrypto.so.1.0.0: no version information available (required by python)
    python: /home/brad/programs/eaglelibs/lib/libssl.so.1.0.0: no version information available (required by python)

    I know I could leave it out of .bashrc, and do the eagle start script you mentioned, but do you know of a way I could actually compile this software with the version information intact?

    Thanks again!

  47. hellospencer Says:

    Works for Ubuntu 12.04 x64. Thanks alot!

  48. megabruco Says:

    Thank you!
    very clean and, best of all, it works! :-)

    you saved my day!

  49. Andrew Says:

    This was extremely helpful. Got it to work following your instructions. Thank you!

  50. erro na instalação do eagle 6 « tipagem dinâmica Says:

    [...] este post em inglês orienta a preparar o ambiente pra instalação. a seção “Preparations” é direcionada a sistemas ubuntu, portanto você deve encontrar pacotes correspondentes caso use outra distro. a partir daí a solução é abrangente, baseada em compilação dos fontes das bibliotecas necessárias. [...]

  51. Amanda Tresbach Says:

    hey, amaazing! thank you so much!!

    how about a little improvement? start setting a variable with eagle install path

    mypath=/opt

    and then use it through steps like

    export LD_LIBRARY_PATH=$mypath/lib

    supose it’ll help not only beginners, but also distracted ones (me included xP)

  52. Michael Tempest Says:

    Thanks – this procedure also works for eagle 6.3.0.
    I now have EagleCAD 6.3.0 running on debian squeeze amd64 :)
    v6.3.0 doesn’t need specific versions of libpng and libjpeg, but I did need this procedure for libssl.

  53. wulfi Says:

    thank you very much,

    works perfect for me :-)

  54. My First PCB | greenhac Says:

    [...] following this very useful guide I was able to get EAGLE 6 running on Debian squeeze and was ready to design [...]

  55. Allen Says:

    This instruction works perfectly on ubuntu 11.04, and eagle 6.3.0., very clear too, thanks a lot!