STATA is a general-purpose statistical software package for *nix, Windows and Mac. In the following you'll be presented with how to install STATA and the needed libraries.
You need to install a series of libraries to run Stata. Stata uses the GTK+ framework.
If you are running STATA 14 and get a message about missing libncurses.so.5 install AUR.
After you have installed these packages, you need to insert your STATA DVD and mount it.
If you have been provided an ISO rather than a physical DVD you can mount it with the following command
# mount -o loop /path/to/file.iso /mnt
If you have been provided a DVD and it is not automatically mounted, you can use the following command to mount it to
# mount -t iso9660 -o ro /dev/cdrom /mnt
You then need to create a directory for Stata. Stata recommends putting it under
/usr/local/. For example:
# mkdir /usr/local/stata12
Once you have created the directory, change into it:
$ cd /usr/local/stata12
and run the installer from the directory you mounted the CD into (
/mnt in this guide):
Follow the instructions and you will end up with Stata installed.
After you have installed Stata, change the permissions on
/usr/local/stata12 so you can execute it as a normal user:
# chmod -R 755 /usr/local/stata12
Tips and tricks
To add Stata to your path, add the following to the end of your path in your bashrc:
Stata 12 and 13 at least were built on older versions of libpng and zlib. Thus, icons will be missing when launching Xstata, the graphical interface. The workaround is NOT to downgrade your system's libraries, but rather to follow the advice given by StataCorp's technical department here. It involves compiling the older versions of libpng and zlib and putting them in a folder that your system will not interact with. Then a wrapper for Stata needs to be made to reference these libraries. These steps have been automated by a script on bitbucket, located here.