Octave for Red Hat Linux systems

From Octave
Revision as of 17:12, 4 July 2020 by 113.128.188.70 (talk)
Jump to navigation Jump to search

For RedHat-based distributions like RedHat, CentOS, Fedora, Scientific Linux, ...

Generic RedHat

Tested Fedora 20, but not completely.

 yum install gcc gcc-c++ kernel-devel make mercurial libtool libtool-ltdl-devel libtool-ltdl autoconf cmake lapack-devel \
 lapack pcre-devel readline-devel readline fftw-devel glpk-devel suitesparse suitesparse-devel gnuplot libcurl-devel zlib-devel \
 flex texlive gperf fltk-devel qhull-devel hdf5-devel gl2ps-devel qrupdate-devel arpack-devel qscintilla-devel llvm-devel qt-devel \
 bison ghostscript-devel librsvg2-tools icoutils texlive-metapost

CentOS

Enable use of Extra Packages for Enterprise Linux (EPEL) AND THEN install octave dependencies development packages:

   yum -y install yum-utils
   yum-builddep -y octave
   yum -y install qt-devel mercurial gcc-c++ lapack-devel libtool
   yum -y install epstool transfig pstoedit qscintilla-devel

The arpack-devel package distributed with CentOS 7 (arpack-devel-3.1.3-2.el7.x86_64) seems a bit old, as routine "seupdate" seems not recognized during the "configure" step. This can be solved by installing arpack from github:

   git clone git@github.com:opencollab/arpack-ng.git
   cd arpack-ng
   ./bootstrap
   ./configure --prefix="some local prefix"
   make; make install

Current release as of Aug. 20th 2018 seems to compile OK with CentOS blas-devel

Prepare installation of Octave

The remaining steps do not need to be done as root, except for possibly the final installation step. I recommend you create an installation directory like /usr/local/octave/VERSION so that it is easy to uninstall a given version simply by removing a directory tree. Then to use the installed version, put /usr/local/octave/VERSION/bin in your PATH. If you create the /usr/local/octave/VERSION directory with appropriate permissions, it is not necessary to be root to install Octave. For example,

   mkdir -p /usr/local/octave/dev
   chown jwe.jwe /usr/local/octave/dev

create src and build directories:

   mkdir src build
Compiling Octave from source

Check out a copy of the octave sources in the src directory

   cd src
   hg clone http://hg.savannah.gnu.org/hgweb/octave
  • bootstrap the build system
   cd octave
   ./bootstrap
  • build Octave in the build directory. choose whatever prefix is appropriate for your system. the -jN option builds in parallel
   cd ../../build
   ../src/octave/configure --prefix=/usr/local/octave/dev
   make -j6 all
  • Run the test suite
   make check
  • If everything looks OK (a few failures are probably normal for the development version) install it
   make install

Redhat Enterprise Linux -2.6.32-358

Use the rpms to install octave version: 3.4.3

  1. yum install gnuplot
  • Download and install lcms
  1. rpm -ivh lcms2-2.8-6.el6.x86_64.rpm
  • Download and install libwmf
  1. rpm -ivh libwmf-lite-0.2.8.4-25.el6_7.x86_64.rpm
  • Download GraphicsMagick and GraphicsMagick-c++ and install them
  1. rpm -ivh GraphicsMagick-1.3.32-1.el6.x86_64.rpm
  2. rpm -ivh GraphicsMagick-c++-1.3.32-1.el6.x86_64.rpm
  • Install suitesparse
  1. yum install suitesparse
  • Install fftw3
  1. yum install fftw
  1. yum install glpk
  • Download and install fltk
  1. rpm -ivh fltk-1.1.10-1.el6.x86_64.rpm
  • Download and install hdf5
  1. rpm -ivh hdf5-1.8.5.patch1-10.el6.x86_64.rpm
  • Download and install qhull
  1. rpm -ivh qhull-2003.1-14.el6.x86_64.rpm
  • Install blas
  1. yum install blas
  • Download and install qrupdate
  1. rpm -ivh qrupdate-1.1.2-1.el6.x86_64.rpm
  • Install texinfo
  1. yum install texinfo
  • Lastly, install octave
  1. rpm -ivh octave-3.4.3-2.el6.x86_64.rpm