Invalid ELF header - KiCad do not start :(

Hi folks,

I have problems to start KiCad from Ubuntu 16.
Every time I start KiCad by pressing on the icon it appears in the bars and disappear again.

If I start it via terminal by “kicad” the follwowing error appears:
“kicad: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0: invalid ELF header”

I noticed same behavior by starting FileZilla
“filezilla: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0: invalid ELF header”

Hope anyone can help.

UPDATE :
I cleaned up my PPAs and now I get an other ELF error. Now (by FileZilla and KiCad) I get the follwoing new error:

kicad: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libwx_baseu_net-3.0.so.0: invalid ELF header

The old error:

kicad: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0: invalid ELF header

is not available anymore.

Greetings,
electroniclover

Try reinstalling wxgtk
apt-get --reinstall install libwxgtk3.0-0v5

Did it but still same error :frowning:

Check to ensure the two files mentioned under /usr/lib have execute privileges under user.

Sorry, but this is nonsense.
No library needs executing right. A library is getting loaded and the required symbol needs to be available so it can get loaded and used by the application. In the *nix world they are called Shared Objects (hence the file extension .so), in Windows they are called Dynamic Link Library (aka the .dll suffix).

In any case Ubuntu 16.04 is near its end of life and is 5 years old, maybe it’s time to upgrade?

What’s the KiCad version? Have you installed 5.1 from the ppa?

I hesitate to offer suggestions because frustratingly this is the sort of problem that an experienced Linux user can solve on the spot, but there’s only online communication to you. Also I don’t have an Ubuntu system to hand, as my distro uses RPM so I may make typos in the DEB commands. But I’ll give you some questions to check which might give you a clue.

  • Has filezilla worked in the past? Did the problem start sometime? Do you remember what you did?
  • Did you add any repos that aren’t for 16.04? Did you install from the correct KiCad PPA?
  • What does the command dpkg -S /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0 print out? (Should be name of package that it was installed from.)
  • Check the file /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0. This is probably a symlink to …so.0.2 if the info on this package is correct. Is the …so.0.2 file there? Does it look whole or too small? (Should be a few hundred kB as that’s the size on my system.) What does the utility “file” say about it?
  • What does ldd /usr/bin/kicad | grep libwx print out? Ditto for filezilla. Missing dynamic library is a problem.
  • Is it possible you have disk errors on your system that might corrupt files?

I checked the library and found it at the desired path:

/usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0

How can I execute privileges to an user to use a lib?

I checked the library and found it at the desired path:

/usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0

the extension of the lib is so.0
Is this a problem?

I use some toolchains which only works with Ubuntu 16.04. I tried them with higher Ubuntu but didn’t work so I still use Ubuntu 16.

KiCad Version: 5.1.9-202012230804+73d0e3b20d~88~ubuntu16.04.1

Yes, I installed it from here.

Hi retiredfeline,

UPDATE: I cleaned up my PPAs and now I get an other ELF error. Now (by FileZilla and KiCad) I get the follwoing error:

kicad: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libwx_baseu_net-3.0.so.0: invalid ELF header

The old error:

kicad: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0: invalid ELF header

is not available anymore.

FileZilla and KiCad worked in the past without problems. I think I installed some nasty software in the past…

It is possible that I add in the past by mistake some wrong repos which aren’t for 16.04. Yes, I think I installed it correctly because it works fine in the past.
I get the following output:

libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0

ls -l libwx_gtk2u_aui-3.0.so.0 lrwxrwxrwx 1 root root 28 Jan 25 2017 libwx_gtk2u_aui-3.0.so.0 -> libwx_gtk2u_aui-3.0.so.0.2.0

du -sh libwx_gtk2u_aui-3.0.so.0 0 libwx_gtk2u_aui-3.0.so.0

KiCad
/usr/bin/kicad: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libwx_baseu_net-3.0.so.0: invalid ELF header

FileZilla
/usr/bin/filezilla: error while loading shared libraries: /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0: invalid ELF header

Yes, in the past I had a disk error and my computer didn’t start. I had to start the computer by recovery mode. It fixed something on the disk for a while and the computer started.

Can you post the output of
ls /usr/lib/x86_64-linux-gnu/libwx_gtk3u_aui-3.0.so* -la

OUTPUT:

ls: cannot access '/usr/lib/x86_64-linux-gnu/libwx_gtk3u_aui-3.0.so*': No such file or directory

Sorry, that was for my system (Ubuntu 20)

Try:
ls /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui* -la

OUTPUT:
lrwxrwxrwx 1 root root 28 Jan 25 2017 /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0 -> libwx_gtk2u_aui-3.0.so.0.2.0 -rw-r--r-- 1 root root 622992 Jan 25 2017 /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0.2.0

Try doing a filesystem check on your system. I don’t know how this is done under Ubuntu. I hardly ever have to do this on my distro.

My output from the same command is
lrwxrwxrwx 1 root root 28 Jan 2 2019 /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0 -> libwx_gtk2u_aui-3.0.so.0.4.0
-rw-r–r-- 1 root root 624744 Jan 2 2019 /usr/lib/x86_64-linux-gnu/libwx_gtk2u_aui-3.0.so.0.4.0

am using Version: 5.1.9+dfsg1-1~bpo10+1, release build

Caveat: Ubuntu is not Debian and that shared library comes from another package anyway.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.