Cisco PacketTracer 7.2.2 fix on Ubuntu 19.04

Posted on Posted in Cisco, Ubuntu

I ran into some trouble getting PT to run on Ubuntu 19.04 and after a bit of research it looks like not only is the libpng12 package required but it needs further customization due to /lib being a symlink to /usr/lib now. While I appreciate the folks dropping links to custom .deb packages I wanted to roll my own

#assumes PacketTracer 7.2.2 has already been installed to /opt/pt

#create dir to hold libpng12
sudo mkdir /opt/pt/libpng
cd /opt/pt/libpng

#obtain official package
sudo wget http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb .

#extract package
sudo dpkg-deb -x libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ./libpng12

#Original package structure
#libpng12/
#├── lib
#│   └── x86_64-linux-gnu
#│       ├── libpng12.so.0 -> libpng12.so.0.54.0
#│       └── libpng12.so.0.54.0
#└── usr
#    ├── lib
#    │   └── x86_64-linux-gnu
#    │       └── libpng12.so.0 -> /lib/x86_64-linux-gnu/libpng12.so.0
#    └── share
#        └── doc
#            └── libpng12-0
#                ├── ANNOUNCE
#                ├── changelog.Debian.gz
#                ├── copyright
#                ├── KNOWNBUG
#                ├── libpng-1.2.54.txt.gz
#                ├── README.Debian
#                ├── README.gz
#                └── TODO

#export package detail 
sudo dpkg-deb -e libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ./libpng12/DEBIAN

#remove symlink from /usr/lib
sudo rm ./libpng12/usr/lib/x86_64-linux-gnu/libpng12.so.0

#move all contents from /lib to /usr/lib 
sudo mv ./libpng12/lib/x86_64-linux-gnu/* ./libpng12/usr/lib/x86_64-linux-gnu/

#build package
sudo dpkg-deb -b ./libpng12 libpng12-0_1.2.54_amd64_custom.deb

#install custom package
sudo apt install ./libpng12-0_1.2.54_amd64_custom.deb