Difference between revisions of "Stata"

From ArchWiki
Jump to: navigation, search
m (Needed libraries)
m (keep it simple)
 
(19 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[Category:Status monitoring and notification]]
+
[[Category:Mathematics and science]]
 
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.
 
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.
  
Line 6: Line 6:
 
You need to install a series of libraries to run Stata. Stata uses the GTK+ framework.
 
You need to install a series of libraries to run Stata. Stata uses the GTK+ framework.
  
If you use GNOME, you'll need the following additional packages.
+
{{Accuracy|1={{AUR|libgtksourceviewmm}}{{Broken package link|{{aur-mirror|libgtksourceviewmm}}}} has no package() function and outdated depends.}}
  
=== GNOME ===
+
If you use GNOME, [[install]] {{AUR|libgtksourceviewmm}}{{Broken package link|{{aur-mirror|libgtksourceviewmm}}}} and {{AUR|libgnomeprint}}.
{{Accuracy|symlink like this is always frowned upon. If so name is changed, it usually means not backward compatiable. So fix the package or rebuild it. Do not use this walk around.}}  
+
  
You need the package {{Pkg|libgtksourceviewmm2}} which is found in the '[community]' repository.
+
If you are running STATA 14 and get a message about missing libncurses.so.5  [[install]] {{AUR|ncurses5-compat-libs}}.
 
+
After you have installed the package, you need to create a symlink from {{ic|libgtksourceview-2.0.so.0}} to {{ic|libgtksourceview-1.0.so.0}}. To do this run this command as root:
+
 
+
{{bc|ln -s /usr/lib/libgtksourceview-2.0.so.0 /usr/lib/libgtksourceview-1.0.so.0}}
+
 
+
You also need the package {{AUR|libgnomeprint}} which is available in the AUR.
+
  
 
== Installing Stata ==
 
== Installing Stata ==
Line 25: Line 18:
 
If you have been provided an ISO rather than a physical DVD you can mount it with the following command
 
If you have been provided an ISO rather than a physical DVD you can mount it with the following command
  
{{bc|mount -o loop /path/to/file.iso /mnt}}
+
# 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 {{ic|/mnt}}
 
If you have been provided a DVD and it is not automatically mounted, you can use the following command to mount it to {{ic|/mnt}}
  
{{bc|mount -t iso9660 -o ro /dev/cdrom /mnt}}
+
# mount -t iso9660 -o ro /dev/cdrom /mnt
  
 +
You then need to create a directory for Stata. Stata recommends putting it under {{ic|/usr/local/}}. For example:
  
You then need to create a directory for Stata. Stata recommends putting it under {{ic|/usr/local/}}
+
# mkdir /usr/local/stata12
  
{{hc|Create a directory| mkdir /usr/local/stata12}}
+
Once you have created the directory, change into it:
  
Once you've created the directory, change into the directory:
+
$ cd /usr/local/stata12
  
{{bc|cd /usr/local/stata12}}
+
and run the installer from the directory you mounted the CD into ({{ic|/mnt}} in this guide):
  
And run the installer from the directory you mounted the CD into(/mnt in this guide):
+
# /mnt/installer
  
{{bc|/mnt/installer}}
+
Follow the instructions and you will end up with Stata installed.  
 
+
Follow the instructions and you'll end up with Stata installed.  
+
  
 
After you have installed Stata, change the permissions on {{ic|/usr/local/stata12}} so you can execute it as a normal user:
 
After you have installed Stata, change the permissions on {{ic|/usr/local/stata12}} so you can execute it as a normal user:
  
{{bc|chmod -R 755 /usr/local/stata12}}
+
# 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]]:
 +
{{hc|~/.bashrc|
 +
PATH=$PATH:/usr/local/stata12/
 +
}}
 +
 
 +
== Troubleshooting ==
 +
 
 +
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 [http://www.statalist.org/forums/forum/general-stata-discussion/general/2199-linux-stata-bug-libpng-on-newer-opensuse-possibly-other-distributions 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 [https://bitbucket.org/vilhuberl/stata-png-fix here].

Latest revision as of 23:57, 5 April 2016

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.

Needed libraries

You need to install a series of libraries to run Stata. Stata uses the GTK+ framework.

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: libgtksourceviewmmAUR[broken link: archived in aur-mirror] has no package() function and outdated depends. (Discuss in Talk:Stata#)

If you use GNOME, install libgtksourceviewmmAUR[broken link: archived in aur-mirror] and libgnomeprintAUR.

If you are running STATA 14 and get a message about missing libncurses.so.5 install ncurses5-compat-libsAUR.

Installing Stata

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 /mnt

# 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):

# /mnt/installer

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:

~/.bashrc
PATH=$PATH:/usr/local/stata12/

Troubleshooting

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.