0

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 find 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?

2 Answers2

1

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

  • Running this in Ubuntu 22.04.03 and I get `Package libpng12-0 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

    E: Package 'libpng12-0' has no installation candidate `

    – SamBob Nov 24 '23 at 12:27
  • Let me get back to you once I get on my linux machine – Thermal_insulator Nov 24 '23 at 13:07
  • 1
    I did a bit more digging and tis been removed from more recent versions of Ubuntu. This ppa provides it now: https://launchpad.net/%7Elinuxuprising/+archive/ubuntu/libpng12 – SamBob Nov 24 '23 at 13:59
  • Thanks for for the find. Have you managed to run Quartus? – Thermal_insulator Nov 24 '23 at 14:09
0

I have had a similar issue with Libero rather than Quartus. This unfortunately is the 64 bit version of Libero which uses 32 bit libraries, there is no pure 64 bit version of Libero.

For me it was sufficient to get a copy of the library from an older version of Ubuntu from Launchpad Librarian, and extract the library and manually install.

wget http://launchpadlibrarian.net/377985836/libpng12-0_1.2.54-1ubuntu1.1_i386.deb
dpkg-deb -xv libpng12-0_1.2.54-1ubuntu1.1_i386.deb ./libpng
mv libpng/lib/i386-linux-gnu/libpng12.so.0* /lib/i386-linux-gnu/
rm -rf libpng*
ldconfig
SamBob
  • 101