Ubuntu 18.04 PacketTracer7 Setup How to Fix libpng12.so error?

Ubuntu 18.04 PacketTracer7 Setup How to Fix libpng12.so error?

Often after installing PacketTracer 7, we get an error like the one below.

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

Now let’s see how to fix this error.

After downloading the Packet Tracer, open the terminal in the same directory and extract it from the compressed tar.gz file.

sudo tar -zxvf packetracer7.tar.gz

Let’s enter the folder with the files we opened, if we are in the same directory, let’s run the install bash file without doing anything.

bash install

Let’s define the environment variable now.

sudo bash set_ptenv.sh

Installation complete, installation source.

After installation, we can open PacketTracer 7 with the sudo packettracer command, if it doesn’t open, we continue.

Now let’s look at the directory where the installation is and look where the problem is.

cd /opt/pt/bin/

Now let’s try to run it here and examine the error output.

sudo ./PacketTracer7

Now let’s look at the error output:

./PacketTracer7: error while loading shared libraries: libpng12.so.0: 
cannot open shared object file: No such file or directory

If the output is the same, let’s continue, download the required package to  /tmp/ and install it.

sudo wget -q -O /tmp/libpng12.deb 
http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb

Setup:

sudo dpkg -i /tmp/libpng12.deb

Now we can delete the installation file that we downloaded to  /tmp/  directory.

sudo rm /tmp/libpng12.deb

We can now use Packet Tracer 7.

I hope it was a useful article.