Feed on
  1. Login as root and run the following (accept all dependencies):
    yum install python python-devel xorg-x11-proto-devel libXext-devel gcc-c++ libXrender* PyQt4 PyQt4-devel qt qt-devel qemu-img libvirt
    Note: You need to pay attention to the output from yum as the availability of the required packages can’t be guaranteed – you might need to enable some 3rd-party repos and/or download some packages directly using RPMFind.net.
  2. Download the latest GNS3 source, unpack it to /opt, create symbolic link, create subfolders and set permissions (at this time, the GNS3 version is 0.8.3, but a newer version might be available – it’s your call as to which version to use):
    wget http://iweb.dl.sourceforge.net/project/gns-3/GNS3/0.8.3/GNS3-0.8.3-src.tar.gz
    tar -xvf GNS3-0.8.3-src.tar.gz -C /opt
    cd /opt
    ln -s GNS3-0.8.3-src GNS3
    cd GNS3
    mkdir Dynamips IOS Project Cache Temp
    chmod o+rw Project Temp 
  3. Change directory into Dynamips, download the binary and make it executable (at this time, the Dynamips version is 0.2.8-RC3, but a newer version might be available – it’s your call as to which version to use and the URL to download it):
    cd Dynamips
    wget http://downloads.sourceforge.net/project/gns-3/Dynamips/0.2.8-RC3-community/dynamips-0.2.8-RC3-community-x86_64.bin
    chmod +x dynamips*.bin
  4. Download GNS3 icon from here and link in the right locations:
    cd /opt/GNS3
    wget http://www.rehmert.com/wp-content/uploads/2012/08/gns3-150x150.png
    ln -s /opt/GNS3/gns3-150x150.png /usr/share/icons
    ln -s /opt/GNS3/gns3-150x150.png /usr/share/pixmaps
  5. Create a /usr/bin/gns3 with the following content:
    python "/opt/GNS3/gns3"

  6. Set +x on /usr/bin/gns3:
    chmod +x /usr/bin/gns3
  7. Create app for use in app menu and launcher creation
    Create /usr/share/applications/gns3.desktop with the following contents:
    [Desktop Entry]
  8. Now you’ll find GNS3 listed in the Applications -> Programming menu location and can create application launchers in panels or on the desktop with ease…
  9. Edit /opt/GNS3/src/GNS3/Node/AbstractNode.py to comment out the following lines:
    if QtCore.QT_VERSION >= 0x040600:
    flags = flags | self.ItemSendsGeometryChanges

    To avoid the following error message:
    AttributeError: 'xxxxxxxxxxx' object has no attribute 'ItemSendsGeometryChanges'

35 Responses to “Installing GNS3 on CentOS/RHEL 6”

  1. AnttiRahikainen says:


    These instructions were really helpfull for me!

  2. Deepu says:

    You saved my day… It was really helpful.. Thank you 🙂

  3. Alex says:

    Thanks.. very well

  4. usmir says:

    No qemu for 32-bit

  5. Abdel says:

    very useful and the best way i found for installing GNS3 :
    just some remarques :
    should be :
    [Desktop Entry]

    /opt/GNS3/gns3.png is the right path for the icon to be displayed
    and the permission for /usr/bin/gns3 need to change to 755 that way it can be executed

    • jrehmert says:

      thanks for the comment abdel. the icon element being just “gns3.png” should work as long as you created the symbolic links in step 4, because the /usr/share/icons and /usr/share/pixmaps should be in the path for icons. i’ve updated step 5 to indicate the need to set +x on /usr/bin/gns3 if it’s not already set.

      • Abdel says:

        Great just forgot to change the name of the icon after the download from “gns3-150×150.png” to “gns3.png” thats why the icon wasn’t showing .


      • Gary Naj says:

        hi im in the 5th part of installment and it gave me error:
        $ python “/opt/GNS3/gns3″
        /usr/bin/python: can’t find ‘__main__.py’ in ‘/opt/GNS3/gns3′

        I tried to make symbolic link and I dont know if this is correct. How do I delete these?
        sudo ln -s /usr/bin/python/’_main_.py’ /opt/GNS3/gns3
        sudo ln -s /usr/bin/python /opt/GNS3/gns3

        • jrehmert says:

          In step 5, you aren’t supposed to actually execute those lines in the shell (bash, ksh, etc.), rather you should be creating the file (using vi, pico or text editor of your choice) /usr/bin/gns3 with the contents:

          python “/opt/GNS3/gns3”

          Then save it and make it executable in step 6. HTH.

  6. jyothish says:

    it really helpd me…thank you

  7. Shane says:

    Hi, thanks for the steps. Does anyone have steps on installing GNS3 on CentOS with the minimalist install to keep the size down.

    I’m looking for a VM Lab I can configure to test router and ASA configs.

    Is GNOME or KDE better gui for GNS3?

  8. Jackey says:

    Thank you very much! It works!

  9. AndingOne says:

    Absolutely the best how-to on installing GNS3 I’ve ever followed. Great job!

  10. Gary Naj says:

    How should I resolve this?

    $ python “/opt/GNS3/gns3”
    /usr/bin/python: can’t find ‘__main__.py’ in ‘/opt/GNS3/gns3’

    • jrehmert says:

      I’m not sure how you came upon that error, but I’d recommend starting over and following the steps I provided exactly as they’re provided – I just ran through the install again (on a VM) and it still works.

  11. Gary Naj says:

    I already #!/bin/bash and returned a blank which I think means OK and execute python “/opt/GNS3/gns3” which runs the app but when I chmod +x /usr/bin/gns3 it says that no such file or directory?
    I did a echo $PATH and returned me with this: /usr/lib/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/Centosa/bin. WWW (what went wrong) ? Pls. don’t delete my post.

  12. vamsi says:

    tar -xvf GNS3-0.8.3-src.tar.gz -C /opt
    it is not wrking

    • jrehmert says:

      While that’s an interesting comment, I can’t help you w/o more information. There could be any number of reasons the tar isn’t working for you – maybe you’re not in the directory where you downloaded the GNS3 source, maybe you didn’t download the GNS3 source, maybe you downloaded the wrong GNS3 source, maybe you aren’t logged in as root, maybe you aren’t running linux…maybe, maybe, maybe…

  13. Chris says:

    I followed the exact procedure ad the icon is showing under the Application Menu but while I am clicking on the GNS3 icon nothing is happening.
    How to troubleshoot and fix it?
    My outputs are as follows
    [root@monster GNS3]# cat /usr/bin/gns3
    python “/opt/GNS3/gns3”
    [root@monster GNS3]# cat /usr/share/applications/gns3.desktop
    [Desktop Entry]

    I also commented out the lines following step 9.

    [root@monster GNS3]# ls /opt/GNS3
    AUTHORS Cache Dynamips GNS3.e4p IOS qemuwrapper setup.py Temp
    baseconfig_sw.txt CHANGELOG gns3 gns3.icns LICENSE README src TODO
    baseconfig.txt docs gns3-150×150.png gns3.pyw Project securecrt.vbs style.pl vboxwrapper
    [root@monster GNS3]# cd /opt/GNS3
    [root@monster GNS3]# cd Dynamips/
    [root@monster Dynamips]# ls

    • jrehmert says:

      Not sure what to tell you – I just followed my instructions and they still work… Give it another shot and make sure you follow the instructions completely and accurately. Also, verify the output of yum for installing the prerequisite packages – some may no longer be available in the standard yum repos.

  14. sandesh d s says:

    Nice helped lot . Thanks

  15. Marc says:


    I am using CentOS 6.5 and have done according to your instructions the installation. Unfortunately, the program can not start. An error message I do not get.

    Thanks for your help.

    • jrehmert says:

      I just followed my instructions using CentOS 6.5 and it does appear that some RPMs are no longer available in the standard yum repos. You’ll have to enable RepoForge for most and then find and download the qemu-img using RPMFind.net. Besides the need to watch the yum results and ensure all those packages are installed, the instructions are good to go…

  16. Delta says:

    I completed the procedure. how do you start GNS3?

    • jrehmert says:

      If the followed the instructions completely and accurately, you should have a GNS3 entry in Applications -> Programming menu…

  17. gustavo says:

    Awsome post.! i give +10!!!!!!!

  18. Gary Naj says:

    Hi jhemert I upgraded my GNS3 to GNS3-0.8.12 with dynamips-0.2.8-RC3-community-x86 and installed it starting from step 1. When I click the icon from start menu> app> Programming nothing happen. And when I tried to execute it in terminal this is the error

    $sudo python /opt/GNS3/gns3
    ———Traceback lines (saved in exception.log)———-
    Traceback (most recent call last):

    File “/opt/GNS3/gns3”, line 83, in
    import GNS3.Main

    File “/opt/GNS3/src/GNS3/Main.py”, line 24, in
    from GNS3.Application import Application

    File “/opt/GNS3/src/GNS3/Application.py”, line 31, in
    from GNS3.Workspace import Workspace

    File “/opt/GNS3/src/GNS3/Workspace.py”, line 22, in
    import GNS3.NETFile as netfile

    File “/opt/GNS3/src/GNS3/NETFile.py”, line 37, in
    from GNS3.Globals.Symbols import SYMBOLS

    File “/opt/GNS3/src/GNS3/Globals/Symbols.py”, line 22, in
    from GNS3.Node.IOSRouter1700 import IOSRouter1700

    File “/opt/GNS3/src/GNS3/Node/IOSRouter1700.py”, line 21, in
    from GNS3.Node.IOSRouter import IOSRouter

    File “/opt/GNS3/src/GNS3/Node/IOSRouter.py”, line 28, in
    from GNS3.Node.AbstractNode import AbstractNode

    File “/opt/GNS3/src/GNS3/Node/AbstractNode.py”, line 62



    IndentationError: unexpected indent


    • jrehmert says:

      Honestly, I’ve not performed an upgrade in-place from 0.8.3, so I couldn’t tell you the myriad things that might be wrong… While the error indicates an unexpected indent in the python code, that could just be a red herring. I’d recommend installing 0.8.12 from scratch and copying your images and configs in…

  19. DandZ says:

    I’m getting the error via Gnom:
    “Could not launch ‘GNS3’
    Failled to execute child process “gns3″ (Permission denied)”

    the same I’m getting via shell:
    [root@localhost GNS3]# gns3
    -bash: /bin/gns3: Permission denied

    I’m running over RHEL6.5 over VM.
    Tried to change chmod to 755 and 777, not worked.
    Please advise.

    • DandZ says:

      Please disregard, found my mistake, everything is working just fine now!
      Brilliant guide, one of the best I found!:)

  20. dudu says:

    Thanks a lot
    work like a charm!!!