Score:0

Error while loading shared libraries: libpng12.so.0: wrong ELF class: ELFCLASS64

np flag

I am trying to run Quartus 13 on Ubuntu 22.04 (64-bit) and like many other people the libpng12.so.0 is not allowing it to run. First it could not the file. Then I downloaded and installed the package from an answer to another question, then placed the file manually in the Quartus installation folder so the error changed to:

quartus: error while loading shared libraries: libpng12.so.0: wrong ELF class: ELFCLASS64

The installation folder of Quartus has the path: /home/developer/n/quartus/bin

Now I asked this question because many of the solutions worked fine till Ubuntu 21. I need a fix for Ubuntu 22.04 for a 32-bit libpng12 package (I presume this is why the ELF class error occurs).

The command find -name libpng12 returns:

./usr/local/lib/libpng12.so.0
./usr/lib/x86_64-linux-gnu/libpng12.so.0
./home/developer/n/libpng/.libs/libpng12.so.0
./root/libpng-1.2.54/.libs/libpng12.so.0
find: ‘./run/user/1000/doc’: Permission denied
find: ‘./run/user/1000/gvfs’: Permission denied
./snap/core/14399/lib/x86_64-linux-gnu/libpng12.so.0
./snap/core/14399/usr/lib/x86_64-linux-gnu/libpng12.so.0

I copied all of them one by one to /quartus/bin and every time I got the same ELFCLASS error.

I also tried putting the path of libpng12 in ld.so.conf file in /etc then ran ldconfig but still the same problem. I have tried these answers:

Install libpng12 on ubuntu 22.04

https://bbs.archlinux.org/viewtopic.php?id=212077

https://community.intel.com/t5/Programmable-Devices/Quartus-can-t-find-shared-library/td-p/161251

error while loading shared libraries: libpng12.so.0

This no longer works: sudo apt-get install libpng12-0:i386

This package isnt available any more: https://packages.ubuntu.com/xenial/i386/libpng12-0/download

How do I get my software to run?

Score:1
np flag

This works flawlessly on 64-bit Ubuntu 22.04:

sudo apt-get install libpng12-0

This installs the 64-bit libpng12 version needed by Quartus 13. Go to /bin folder of your Quartus installation. My path was this:

/root/altera/13.0sp1/quartus/bin

Then run this:

./quartus --64bit

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.