Note that you'll be using the development version which is more up-to-date but it's often more unstable. You should issue a "git pull" command very often. If you just want to use a stable version of Slic3r, download it by clicking on your operating system above.

Ubuntu

You must first install the build-essential, libgtk2.0-devlibwxgtk2.8-dev, libwx-perl(this can be skipped, it just makes installation faster), and libmodule-build-perl packages. Should you have problems with the sudo perl Build.PL command, you can replace it with curl -L http://cpanmin.us | perl - --sudo --installdeps . which should work a lot better on some Ubuntu systems having broken CPAN setups. See this page for instructions.