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.
1 | 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.
1 | bash install |
Let’s define the environment variable now.
1 | 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.
1 | cd /opt/pt/bin/ |
Now let’s try to run it here and examine the error output.
1 | sudo ./PacketTracer7 |
Now let’s look at the error output:
1 2 | ./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.
1 2 | 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:
1 | sudo dpkg -i /tmp/libpng12.deb |
Now we can delete the installation file that we downloaded to /tmp/
directory.
1 | sudo rm /tmp/libpng12.deb |
We can now use Packet Tracer 7.
I hope it was a useful article.