Brownie (and RBrownie) both depend on the GNU Scientific Library (GSL). This tutorial will go though how to install it in various operating systems.
Many linux distributions such as Ubuntu and OpenSUSE have great package management systems which probably contain GSL packages. If you use these operating systems then you probably know how to use their package managers. This is the recommend way to install the GSL in linux.
Otherwise, you'll have to download the GSL source manually:
- go to: http://www.gnu.org/prep/ftp.html
- click on an ftp link close to your location
- find the
gsl/ directory and click on it
- find the
gsl-VERSION.tar.gz file, where version is 1.14 or greater. Click on that file to download it.
- In a terminal window extract the tar.gz file using
tar -xzf gsl-VERSION.tar.gz and then
cd to the ./gsl-VERSION directory
- Look at the INSTALL file. It will probably tell you to run
make, and then
make install (and you might have to login as the superuser (
NOTE: You will want to build the GSL for the same architecture as whatever architecture R is built under (i.e. 64-bit if using 64-bit R).
Follow the same procedure for Linux, just make sure that you install Xcode (which comes with a C/C++ compiler) and you might need to update Xcode if
g++ --version is less than 4.1.0. If you are using an old version of Mac OSX (< 10.5), you might need to use an older version of the GSL.
It is highly recommended that you install a pre-compiled GSL in Windows. Compiling the GSL from source in Windows is at best tricky and at worst nightmarish. I use the Boost Science Package compiled by Gordon Taft:
- Download either the 32-bit or 64-bit version of the GSL (which ever R version you are using)
- Open the file go through the installer. Make sure the install directory has a linux-style path name (no spaces). For example, I installed to
- Once the package has been installed, you need to set an environmental variable pointing to it:
- In windows, click on the Start button, right click on "computer" and choose "properties"
- Click "Advanced system settings"
- Click "Environmental variables"
- Click the highest "new..." button
- For "Variable name" enter LIB_GSL
- For "Variable value" enter the directory you installed the Boost Science Library to (in my case it was "C:/Boost_Science_Library/")
Now you can try to install RBrownie. It should work and if it does not then post here and we will try to help you out.