Skip to content

Instantly share code, notes, and snippets.

@dahngeek
Last active March 22, 2021 05:10
Show Gist options
  • Save dahngeek/70b4049f802ff518c7463673ffe6670f to your computer and use it in GitHub Desktop.
Save dahngeek/70b4049f802ff518c7463673ffe6670f to your computer and use it in GitHub Desktop.
Repair GNS3 Linux VPCS path not defined.
  1. Download the original VPC
  2. https://sourceforge.net/projects/vpcs/
  3. Add it to some directory and chmod +x thedownloadedfile
  4. copy the path to that file into GNS3 config.

This page gave me the hint: https://docs.gns3.com/docs/emulators/vpcs/

If that doesnt work because when you're using the console in GNS3, just by typing two letters or characters it sends the command and makes the VPCS unusable, yo should try de following

  1. Go to https://sourceforge.net/projects/vpcs/ and download the code as a zip from the "Code" tab.
  2. unzip it or extract it
  3. cd into `/diroftheextractedcode/src'
  4. and run ./mk.sh [32 | 64] (depending on your processor architecture)
  5. it should make vpcs
  6. move it to your bin directory sudo mv vpcs /usr/local/bin

If while running ./mk you run into the following error:

./getopt.h:53:5: error: conflicting types for ‘getopt’
 int getopt(int argc, char** argv, char* optstr);
     ^~~~~~**
In file included from /usr/include/bits/getopt_posix.h:27:0,
                 from /usr/include/unistd.h:872,
                 from hv.c:33:

Then run the following commands to fix it and also move it to /bin:

  1. Remember to be in cd vpcs-code/src
  2. Then run the following commands
$ rgetopt='int getopt(int argc, char *const *argv, const char *optstr);'
$ sed -i "s/^int getopt.*/$rgetopt/" getopt.h
$ unset -v rgetopt
$ sed -i 's/i386/x86_64/' Makefile.linux
$ sed -i 's/-s -static//' Makefile.linux
$ make -f Makefile.linux
$ strip --strip-unneeded vpcs
$ sudo mv vpcs /usr/local/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment