Home > Howto, ubuntu > Cisco PacketTracer install Linux

Cisco PacketTracer install Linux

Installing 32bit Cisco Packet Tracer 6 on 64bit ubuntu 14 causes headaches.
Here’s how to get it running -read more for the steps I went through to work this out and don’t just run commands blindly without understanding them.

# possibly magic quickfix

dpkg --add-architecture i386

apt-get update
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 libssl1.0.0:i386 libssl-dev:i386 libssl1.0.0 libssl-dev libx11-dev:i386 libxrender-dev:i386 libfreetype6-dev:i386 libfontconfig1-dev:i386 libglib2.0-dev:i386 libqtwebkit4:i386

At this point, if you try and launch /opt/pt/bin/PacketTracer6 directly you end up with missing ‘libQtWebKit.so.4’ errors. Launch `/usr/local/bin/packettracer` and it works (as the script sources the libraries it ships with).

On the flipside, linux mint (matte) runs it first time with no faffing about :)

Continue reading for why and how we got to this point.

Right, here’s the blow by blow.

Ubuntu 14.4.01 – x86_64
start with “Cisco Packet Tracer 6.1.1 for Linux – Ubuntu installation (with tutorials) – Student version.tar.gz” in your /home/user/Downloads folder

Written for someone who’s never used linux before (/me waves)…
(# at the start of a line denotes a comment)

Open a terminal.

# start by making ubuntu tolerable
sudo apt-get install screen atop htop vim aptitude openssh-server

# tab complete is your friend.
cd ~/Downloads/
tar -xvf Cisco\ Packet\ Tracer\ 6.1.1\ for\ Linux\ -\ Ubuntu\ installation\ \(with\ tutorials\)\ -\ Student\ version.tar.gz

Unlike zip files which bundle stuff together and compress it, on linux we keep the steps separate. a tar.gz is a bunch of files collected together into a tar archive which is then compressed with gzip. Why make it complicated? Well, it means we can easily swap out with different/better compression algorithms.

Tell tar to eXtract the files, be Verbose and that the input Filename is Cisco….. -notice all the back slashes before the spaces -this is because you need to “escape” the spaces so they don’t get misunderstood as different files.

[email protected]:~/Downloads$ ls -l
total 220196

-rw-r–r– 1 buildtherobots buildtherobots 225461588 Jan 22 20:19 Cisco Packet Tracer 6.1.1 for Linux – Ubuntu installation (with tutorials) – Student version.tar.gz
drwxrwxr-x 12 buildtherobots buildtherobots 4096 Aug 12 19:56 PacketTracer611Student

## Note the d at the start of the second line -it’s a Directory

[email protected]:~/Downloads$ cd PacketTracer611Student/
[email protected]:~/Downloads/PacketTracer611Student$
[email protected]:~/Downloads/PacketTracer611Student$ ls -l
total 72
drwxrwxr-x 23 buildtherobots buildtherobots 4096 Mar 20 2014 art
drwxrwxr-x 6 buildtherobots buildtherobots 4096 Nov 18 2013 backgrounds
drwxr-xr-x 6 buildtherobots buildtherobots 4096 Mar 14 2014 bin
-rw-r–r– 1 buildtherobots buildtherobots 14227 Nov 18 2013 eula.txt
drwxr-xr-x 12 buildtherobots buildtherobots 4096 Mar 14 2014 extensions
drwxr-xr-x 3 buildtherobots buildtherobots 4096 Mar 13 2014 help
-rwxr-xr-x 1 buildtherobots buildtherobots 2718 Aug 12 19:56 install
drwxr-xr-x 2 buildtherobots buildtherobots 4096 Mar 14 2014 LANGUAGES
drwxr-xr-x 2 buildtherobots buildtherobots 4096 Nov 18 2013 lib
drwxrwxr-x 12 buildtherobots buildtherobots 4096 Nov 18 2013 saves
-rwxr-xr-x 1 buildtherobots buildtherobots 1237 Mar 13 2014 set_ptenv.sh
drwxrwxr-x 2 buildtherobots buildtherobots 4096 Nov 18 2013 sounds
drwxrwxr-x 2 buildtherobots buildtherobots 4096 Nov 18 2013 templates
-rw-r–r– 1 buildtherobots buildtherobots 159 Nov 18 2013 tpl.linguist
-rw-r–r– 1 buildtherobots buildtherobots 175 Mar 13 2014 tpl.packettracer

The file “install” is a regular file, and it’s executable (link to file permissions explanation) so lets run it. Your standard user won’t have permissions to install it though, so we need to run it as root. We can do that on command line by running the command we want with the sudo command (think right-click “run as administrator)

[email protected]:~/Downloads/PacketTracer611Student$ sudo ./install
Welcome to Cisco Packet Tracer 6.1.1 Installation
Read the following End User License Agreement “EULA” carefully. You must accept the terms of this EULA to install and use Cisco Packet Tracer.
Press the Enter key to read the EULA.
Ok, hit enter and then use the space bar to page down the license agreement. Type Y and hit return to accept.
We’re going to accept all the defaults, basically for any question hit return.
Enter location to install Cisco Packet Tracer or press enter for default [/opt/pt]:
Installing into /opt/pt

Should we create a symbolic link “packettracer” in /usr/local/bin for easy Cisco Packet Tracer startup? [Yn]
Type “packettracer” in a terminal to start Cisco Packet Tracer
Writing PT6HOME environment variable to /etc/profile
Copied all files successfully to /opt/pt
Cisco Packet Tracer 6.1.1 installed successfully

Brilliant, we’re installed! So to run it, it’s as simple as typing “packettracer” in a terminal -great!

[email protected]:~/Downloads/PacketTracer611Student$ packettracer
Starting Packet Tracer 6.1
[email protected]:~/Downloads/PacketTracer611Student$

Nothing, not even an error, just exits cleanly back to the prompt. Ok, obviously this isn’t going to be easy, so lets step through it. Firstly, where is the file we’re actually running?

# whereis tells us where things is :)
[email protected]:~/Downloads/PacketTracer611Student$ whereis packettracer
packettracer: /usr/local/bin/packettracer

Now we know _where_ it is, we need to know _what_ is it. On windows you identify files by the last three letters after the full stop -the file extension. jpeg images end in .jpg, mp3 files are surprisingly .mp3 -and if you rename it with the wrong extention (or even worse delete it entirely) then windows gets very upset and won’t open it any more, until you rename it back with the right extension.

Linux does things differently. We just look at the the contents of the file and use some magic tests to work out what it is. This is easy for computers (run `man 1 file` in a terminal to read how it works), but difficult for humans; so we use the `file` command.

file /usr/local/bin/packettracer
/usr/local/bin/packettracer: symbolic link to `/opt/pt/packettracer’

## Ok, so it’s actually just a shortcut. So what is the actual executable then?

[email protected]:~/Downloads/PacketTracer611Student$ file /opt/pt/packettracer
/opt/pt/packettracer: Bourne-Again shell script, ASCII text executable

Ok, so it’s just a bash script (think a .bat file… but less awful) -so as well as being an executable file, it’s nice and readable :)

# cat splurges the contents of a file out
[email protected]:~/Downloads/PacketTracer611Student$ cat /opt/pt/packettracer

echo Starting Packet Tracer 6.1

pushd $PTDIR/bin > /dev/null
./PacketTracer6 “[email protected]” > /dev/null 2>&1
popd > /dev/null

OK, first line tells the computer which language the script is it (it’s called a shbang).
The script printing the infuriating start message and setting the LD_LIBRARY_PATH variable to point to /opt/pt/lib/
We then change directory to /opt/pt/bin and hide/throw away any printed results.
we then run the PacketTracer6 executable, pass any options we were given and once again throw away all the output and errors, before changing directory back to where we were. So that’s why we get no indication of a problem.

But we know exactly what it’s doing, so we can do it ourselves and not throw away the tasty tasty error messages:

cd /opt/pt/bin/
[email protected]:/opt/pt/bin$ ./PacketTracer6
-bash: ./PacketTracer6: No such file or directory

the heck? it’s right there, it tab completed and everything. -what sort of program is this non-existing file then anyway?

[email protected]:/opt/pt/bin$ file PacketTracer6
PacketTracer6: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=d0a36a0794398057d595c5248c2cb5c38f682951, not stripped

aah,32 bit executable and we’re a 64bit OS. That would be why it’s all going horriby wrong -ubuntu can’t execute it (though why we get the file not found somewhat eludes me). Lets teach it how to run 32bit stuff then.

sudo dpkg --add-architecture i386

sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

you noticed how we stuck a :i386 on the end there to force it to install the 32bit version of those packages?

Lets try and run it again now we can execute 32bit binaries.

[email protected]:/opt/pt/bin$ ./PacketTracer6
./PacketTracer6: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

Well it’s progress, but we’re still not all the way there. This binary file is expecting to be able to talk to some shared 32bit libraries which we don’t have either. I used `apt-cache search` to find the correct packages (google is also your friend, also `aptitude search` is betterer imho) installed what it complained about, tried to run the program again and then find the next missing library.
This cycle repeated a few times round, but in the end, I think this installs all of them:

sudo apt-get install libssl1.0.0:i386 libssl-dev:i386 libssl1.0.0 libssl-dev libx11-dev:i386 libxrender-dev:i386 libglib2.0-dev:i386 libfreetype6-dev:i386 libfontconfig1-dev:i386

And then we try and run it again, and good gosh it works!

[email protected]:/opt/pt/bin$ ./PacketTracer6
good gosh, it finally runs!

Look Ma -It’s Cisco!

Random Thought (answer for extra credit): If I’d have remembered to export that variable, might it have used the copies of the libraries it shipped with?

Still left to do:

  • make a launcher icon
  • check full functionality
  • redo on mint because ffs, ubuntu
  • work out how to stop wordpress converting double-hyphens to em-dashes -ffs
  • /opt/pt/set_ptenv.sh – reboot?
  1. February 3rd, 2015 at 15:05 | #1

    Thank you very much! This helped me get it working for uni on Ubuntu 14.04 64 bit on my Chromebook.

  2. February 19th, 2015 at 22:01 | #2

    Brilliant! -really glad it’s helped someone :)

  3. uranio23
    February 26th, 2015 at 02:44 | #3

    Wow great, thanks for the help, now my PT is up and running.

  1. No trackbacks yet.