Jan 20, 2014

Install Octave on Ubuntu

It took me about 10 times to install the Octave from source on a fresh Ubuntu system. Here are steps.

1. sudo apt-get install gfortran debhelper automake dh-autoreconf texinfo texlive-latex-base texlive-generic-recommended epstool transfig pstoedit libreadline-dev libncurses5-dev gperf libhdf5-serial-dev libblas-dev liblapack-dev libfftw3-dev texi2html less libpcre3-dev flex libglpk-dev libsuitesparse-dev gawk ghostscript libcurl4-gnutls-dev libqhull-dev desktop-file-utils libfltk1.3-dev libgl2ps-dev libgraphicsmagick++1-dev libftgl-dev libfontconfig1-dev libqrupdate-dev libarpack2-dev dh-exec libqt4-dev libqscintilla2-dev default-jdk dpkg-dev gnuplot-x11 libbison-dev libxft-dev llvm-dev
2. Install openblas regularly
3. Use apt-cache search libopenblas* to find where the openblas lib is
4. I replaced the softlink of liblapack to libopenblas:
    sudo rm -r /usr/lib/liblapack***.so.3gf
    sudo ln -s /lib/libopenblas***.so /usr/lib/liblapack***.so.3gf
5. ./configure --with-blas=libopenblas --with-lapack=libopenblas  (didn't make it when using --disable-docs, so it is better not to use it)
6. make
7. sudo make install
8. It is done. then run octave
9. in octave prompt, run 'pkg list' to see installed packages.
10. To install packages, run 'pkg install '
11. To load package, run 'pkg load

No comments: