Skip to content

Instantly share code, notes, and snippets.

@happyrobots
Created March 10, 2011 12:42
Show Gist options
  • Save happyrobots/864044 to your computer and use it in GitHub Desktop.
Save happyrobots/864044 to your computer and use it in GitHub Desktop.
Installing Linalg on Fedora 14
1. Download or clone from https://github.com/quix/linalg
( Assume installation folder is linalg )
2. Install dependencies (Lapack, BLAS and legacy Fortran library header)
$ su
# yum install lapack lapack-devel blas blas-devel gcc-gfortran.i686 compat-gcc-34.i686 compat-gcc-34-g77.i686
3. Locate the Fortran header ( g2c.h )
# updatedb
# locate g2c.h
/usr/lib/gcc/i686-redhat-linux/3.4.6/include/g2c.h
If you don't have locate installed, use find instead.
# find / -name g2c.h
4. Copy the Fortran header to linalg/ext/, linalg/ext/lapack/, and linalg/ext/linalg/
$ cp /usr/lib/gcc/i686-redhat-linux/3.4.6/include/g2c.h linalg/ext/
$ cp linalg/ext/g2c.h linalg/ext/lapack/
$ cp linalg/ext/g2c.h linalg/ext/linalg/
5. Run install.rb in linalg
# ruby install.rb
* If you see the error "cannot find -lg2c", do the following.
# ln -s libg2c.so.0 libg2c.so
6. See list of installed files under the linalg folder
$ cat InstalledFiles
Notice that linalg is now installed in your Fedora as a rubygem. Congratulations!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment